using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BansheeEngine;
namespace BansheeEditor
{
///
/// Displays GUI for a serializable property containing a generic object. Inspectable object fields are displayed
/// in separate rows.
///
public class InspectableObject : InspectableField
{
private const int IndentAmount = 5;
private object propertyValue;
private GUILayoutX guiChildLayout;
private GUILayoutX guiTitleLayout;
private bool isExpanded;
private bool forceUpdate = true;
///
/// Creates a new inspectable array GUI for the specified property.
///
/// Name of the property, or some other value to set as the title.
/// Determines how deep within the inspector nesting hierarchy is this field.Some fields may
/// contain other fields, in which case you should increase this value by one.
/// Parent layout that all the field elements will be added to.
/// Serializable property referencing the array whose contents to display.
public InspectableObject(string title, int depth, InspectableFieldLayout layout, SerializableProperty property)
: base(title, depth, layout, property)
{
}
///
public override GUILayoutX GetTitleLayout()
{
return guiTitleLayout;
}
///
protected override bool IsModified()
{
if (forceUpdate)
return true;
object newPropertyValue = property.GetValue