Skip to content

Commit 2529f47

Browse files
author
Tatami
committed
GUIのインデント調整
1 parent fdb2856 commit 2529f47

1 file changed

Lines changed: 25 additions & 22 deletions

File tree

Assets/Nova/Editor/Core/Scripts/ParticlesUberCommonGUI.cs

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -230,33 +230,36 @@ private void InternalDrawBaseMapProperties()
230230
props.BaseMapTriToneProp.Value);
231231
if (props.BaseMapTriToneProp.Value.floatValue != 0.0f)
232232
{
233-
_editor.ShaderProperty(props.BaseHighlightColorProp.Value, "Highlights Color");
234-
_editor.ShaderProperty(props.BaseMidColorProp.Value, "Midtones Color");
235-
_editor.ShaderProperty(props.BaseShadowColorProp.Value, "Shadow Color");
233+
using (new EditorGUI.IndentLevelScope())
234+
{
235+
_editor.ShaderProperty(props.BaseHighlightColorProp.Value, "Highlights Color");
236+
_editor.ShaderProperty(props.BaseMidColorProp.Value, "Midtones Color");
237+
_editor.ShaderProperty(props.BaseShadowColorProp.Value, "Shadow Color");
236238

237-
MaterialEditorUtility.DrawFloatRangeProperty(_editor, "Midtones Boundary", props.BaseMidValueProp.Value,
238-
0.0f, 1.0f);
239-
var mid = props.BaseMidValueProp.Value.floatValue;
240-
var min = props.BaseMinValueProp.Value.floatValue;
241-
var max = props.BaseMaxValueProp.Value.floatValue;
239+
MaterialEditorUtility.DrawFloatRangeProperty(_editor, "Midtones Boundary", props.BaseMidValueProp.Value,
240+
0.0f, 1.0f);
241+
var mid = props.BaseMidValueProp.Value.floatValue;
242+
var min = props.BaseMinValueProp.Value.floatValue;
243+
var max = props.BaseMaxValueProp.Value.floatValue;
242244

243-
min = EditorGUILayout.FloatField("Shadow Boundary", min);
244-
min = Mathf.Clamp(min, 0.0f, 1.0f);
245+
min = EditorGUILayout.FloatField("Shadow Boundary", min);
246+
min = Mathf.Clamp(min, 0.0f, 1.0f);
245247

246-
max = EditorGUILayout.FloatField("Highlights Boundary", max);
247-
max = Mathf.Clamp(max, 0.0f, 1.0f);
248+
max = EditorGUILayout.FloatField("Highlights Boundary", max);
249+
max = Mathf.Clamp(max, 0.0f, 1.0f);
248250

249-
EditorGUILayout.MinMaxSlider(ref min, ref max, 0.0f, 1.0f);
251+
EditorGUILayout.MinMaxSlider(ref min, ref max, 0.0f, 1.0f);
250252

251-
props.BaseMaxValueProp.Value.floatValue = max;
252-
props.BaseMinValueProp.Value.floatValue = min;
253-
if (mid < min)
254-
{
255-
props.BaseMidValueProp.Value.floatValue = min;
256-
}
257-
else if (mid > max)
258-
{
259-
props.BaseMidValueProp.Value.floatValue = max;
253+
props.BaseMaxValueProp.Value.floatValue = max;
254+
props.BaseMinValueProp.Value.floatValue = min;
255+
if (mid < min)
256+
{
257+
props.BaseMidValueProp.Value.floatValue = min;
258+
}
259+
else if (mid > max)
260+
{
261+
props.BaseMidValueProp.Value.floatValue = max;
262+
}
260263
}
261264
}
262265
}

0 commit comments

Comments
 (0)