@@ -40,7 +40,7 @@ namespace BansheeEditor
foreach (var field in inspectableFields)
{
- field.Refresh(GUI.layout);
+ field.Refresh(layout);
}
@@ -32,6 +32,9 @@ namespace BansheeEditor
protected override bool IsModified()
+ if (!isInitialized)
+ return true;
+
int newPropertyValue = property.GetValue<int>();
if (oldPropertyValue != newPropertyValue)
@@ -30,7 +30,7 @@ namespace BansheeEditor
return;
guiLabel = new GUILabel(title);
- layout.AddElement(guiLabel); // TODO - Add foldout and hook up its callbacks
+ layout.AddElement(guiLabel);
guiChildLayout = layout.AddLayoutX();
guiChildLayout.AddSpace(IndentAmount);
@@ -9,11 +9,13 @@ namespace BansheeEditor
public abstract class Inspector
protected GUIPanel GUI;
+ protected GUILayout layout;
protected object referencedObject;
internal void Initialize(GUIPanel gui, object instance)
GUI = gui;
+ layout = gui.layout.AddLayoutY();
referencedObject = instance;
@@ -29,6 +31,7 @@ namespace BansheeEditor
internal void Destroy()
+ layout.Destroy();
GUI.Destroy();
@@ -79,6 +79,8 @@ namespace BansheeEditor
protected override void WindowResized(int width, int height)
+ base.WindowResized(width, height);
RepositionInspectors();
@@ -56,7 +56,7 @@ namespace BansheeEngine
Internal_SetArea(mCachedPtr, x, y, width, height);
- mainArea.SetArea(x, y, width, height);
+ mainArea.SetArea(0, 0, width, height);