Skip to content

Commit 63e1176

Browse files
committed
feat: Add input field object
1 parent a37127d commit 63e1176

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+322
-1316
lines changed

Assets/JCSUnity/Scripts/Settings/JCS_ScreenSettings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ public class JCS_ScreenSettings : JCS_Settings<JCS_ScreenSettings>
1919
{
2020
/* Variables */
2121

22+
// In general
2223
public Action onChanged = null;
2324
public Action onChangedResolution = null;
2425
public Action onChangedSize = null;
2526
public Action onChangedMode = null;
2627

28+
// Resizable
2729
public Action onResizableResize = null;
2830
public Action onResizableIdle = null;
2931

Assets/JCSUnity/Scripts/UI/Bar.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/JCSUnity/Scripts/UI/DeltaNumber/JCS_TextDeltaNumber.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ private void DoDeltaCurrentNumber()
241241
private void UpdateTextRender()
242242
{
243243
#if TMP_PRO
244-
if (mTextLegacy == null && mTMP_Text == null)
244+
if (mTextLegacy == null && mTextTMP == null)
245245
#else
246246
if (mTextLegacy == null)
247247
#endif
@@ -263,8 +263,8 @@ private void UpdateTextRender()
263263
if (mTextLegacy)
264264
mTextLegacy.text = mFullString;
265265
#if TMP_PRO
266-
if (mTMP_Text)
267-
mTMP_Text.text = mFullString;
266+
if (mTextTMP)
267+
mTextTMP.text = mFullString;
268268
#endif
269269
}
270270
}

Assets/JCSUnity/Scripts/UI/Dropdown/JCS_DropdownScreenResolution.cs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ public class JCS_DropdownScreenResolution : JCS_DropdownObject
2525
{
2626
/* Variables */
2727

28+
#if UNITY_EDITOR
29+
[Separator("Helper Variables (JCS_DropdownScreenResolution)")]
30+
31+
[Tooltip("Change the game view editor's window.")]
32+
[SerializeField]
33+
private bool mChangeEditorWindow = false;
34+
#endif
2835

2936
[Separator("Initialize Variables (JCS_DropdownScreenResolution)")]
3037

@@ -54,19 +61,19 @@ private void Start()
5461

5562
private void AddListener()
5663
{
57-
DropdownLegacy?.onValueChanged.AddListener(delegate
64+
mDropdownLegacy?.onValueChanged.AddListener(delegate
5865
{
59-
OnValueChanged_Legacy(DropdownLegacy);
66+
OnValueChanged_Legacy(mDropdownLegacy);
6067
});
6168

62-
TMP_Dropdown?.onValueChanged.AddListener(delegate
69+
mDropdownTMP?.onValueChanged.AddListener(delegate
6370
{
64-
OnValueChanged_TMP(TMP_Dropdown);
71+
OnValueChanged_TMP(mDropdownTMP);
6572
});
6673

6774
// Run once.
68-
OnValueChanged_Legacy(DropdownLegacy);
69-
OnValueChanged_TMP(TMP_Dropdown);
75+
OnValueChanged_Legacy(mDropdownLegacy);
76+
OnValueChanged_TMP(mDropdownTMP);
7077
}
7178

7279
/// <summary>
@@ -128,10 +135,13 @@ private void OnValueChanged(string text)
128135
Screen.SetResolution(width, height, Screen.fullScreenMode);
129136

130137
#if UNITY_EDITOR
131-
GameViewUtils.AddAndSelectCustomSize(
132-
GameViewUtils.GameViewSizeType.FixedResolution,
133-
GameViewSizeGroupType.Standalone, width, height,
134-
text);
138+
if (mChangeEditorWindow)
139+
{
140+
GameViewUtils.AddAndSelectCustomSize(
141+
GameViewUtils.GameViewSizeType.FixedResolution,
142+
GameViewSizeGroupType.Standalone, width, height,
143+
text);
144+
}
135145
#endif
136146
}
137147

0 commit comments

Comments
 (0)