Skip to content

Commit de6b31b

Browse files
committed
style: Minor style changes
1 parent 209d461 commit de6b31b

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

Editor/Drawers/TypeDropdownDrawer.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public void Draw(Action<Type> onTypeSelected)
3434
if (_attribute.ExpandAllFolders)
3535
selectionTree.ExpandAllFolders();
3636

37-
Vector2 dropdownPosition = GUIUtility.GUIToScreenPoint(Event.current.mousePosition);
38-
DropdownWindow.Create(selectionTree, _attribute.DropdownHeight, dropdownPosition);
37+
DropdownWindow.Create(selectionTree, _attribute.DropdownHeight, GUIUtility.GUIToScreenPoint(Event.current.mousePosition));
3938
}
4039

4140
public TypeItem[] GetDropdownItems()

Editor/Drawers/TypeFieldDrawer.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal class TypeFieldDrawer
2525
private readonly Rect _position;
2626
private readonly Action<Type> _onTypeSelected;
2727

28-
private bool _triggerDropDown;
28+
private bool _triggerDropdown;
2929

3030
public TypeFieldDrawer(
3131
SerializedTypeReference serializedTypeRef,
@@ -34,15 +34,15 @@ public TypeFieldDrawer(
3434
bool showShortName,
3535
bool useBuiltInNames,
3636
Action<Type> onTypeSelected = null,
37-
bool triggerDropDown = false)
37+
bool triggerDropdown = false)
3838
{
3939
_serializedTypeRef = serializedTypeRef;
4040
_position = position;
4141
_dropdownDrawer = dropdownDrawer;
4242
_showShortName = showShortName;
4343
_useBuiltInNames = useBuiltInNames;
4444
_onTypeSelected = onTypeSelected;
45-
_triggerDropDown = triggerDropDown;
45+
_triggerDropdown = triggerDropdown;
4646
}
4747

4848
public void Draw()
@@ -58,10 +58,10 @@ private void DrawTypeSelectionControl()
5858
int controlID = GUIUtility.GetControlID(_controlHint, FocusType.Keyboard, _position);
5959
ReactToCurrentEvent(controlID);
6060

61-
if ( ! _triggerDropDown)
61+
if ( ! _triggerDropdown)
6262
return;
6363

64-
_triggerDropDown = false;
64+
_triggerDropdown = false;
6565

6666
_dropdownDrawer.Draw(type =>
6767
{
@@ -96,7 +96,7 @@ private void OnMouseDown(int controlID)
9696
return;
9797

9898
GUIUtility.keyboardControl = controlID;
99-
_triggerDropDown = true;
99+
_triggerDropdown = true;
100100
Event.current.Use();
101101
}
102102

@@ -110,7 +110,7 @@ private void OnKeyDown(int controlID)
110110

111111
if (keyboardFocusIsOnElement && necessaryKeyIsDown)
112112
{
113-
_triggerDropDown = true;
113+
_triggerDropdown = true;
114114
Event.current.Use();
115115
}
116116
}

Runtime/Attributes/InheritsAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[AttributeUsage(AttributeTargets.Field)]
1313
public class InheritsAttribute : TypeOptionsAttribute
1414
{
15-
public Type[] BaseTypes;
15+
protected Type[] BaseTypes;
1616

1717
/// <summary>
1818
/// Initializes a new instance of the <see cref="InheritsAttribute"/> class using one base type and optional

0 commit comments

Comments
 (0)