Fix use prefixLabel position right away
This commit is contained in:
parent
a8bcece352
commit
c9b5193e51
@ -40,14 +40,9 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
|||||||
Rect foldoutLabelRect = new Rect(position);
|
Rect foldoutLabelRect = new Rect(position);
|
||||||
foldoutLabelRect.height = EditorGUIUtility.singleLineHeight;
|
foldoutLabelRect.height = EditorGUIUtility.singleLineHeight;
|
||||||
foldoutLabelRect.x += EditorGUI.indentLevel * 12;
|
foldoutLabelRect.x += EditorGUI.indentLevel * 12;
|
||||||
EditorGUI.PrefixLabel(foldoutLabelRect, label);
|
Rect popupPosition = EditorGUI.PrefixLabel(foldoutLabelRect, label);
|
||||||
|
|
||||||
// Draw the subclass selector popup.
|
// Draw the subclass selector popup.
|
||||||
Rect popupPosition = new Rect(position);
|
|
||||||
popupPosition.width -= EditorGUIUtility.labelWidth;
|
|
||||||
popupPosition.x += EditorGUIUtility.labelWidth;
|
|
||||||
popupPosition.height = EditorGUIUtility.singleLineHeight;
|
|
||||||
|
|
||||||
if (EditorGUI.DropdownButton(popupPosition,GetTypeName(property),FocusType.Keyboard)) {
|
if (EditorGUI.DropdownButton(popupPosition,GetTypeName(property),FocusType.Keyboard)) {
|
||||||
TypePopupCache popup = GetTypePopup(property);
|
TypePopupCache popup = GetTypePopup(property);
|
||||||
m_TargetProperty = property;
|
m_TargetProperty = property;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user