Skip to content

Commit

Permalink
Modified to draw a box per a row of a spreadsheet.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsama committed Apr 27, 2016
1 parent 47353f2 commit 79beead
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 8 deletions.
9 changes: 9 additions & 0 deletions Assets/QuickSheet/Editor/Resources.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/QuickSheet/Editor/Resources/brown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions Assets/QuickSheet/Editor/Resources/brown.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/QuickSheet/ExcelPlugin/Editor/BaseExcelEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@ public class BaseExcelEditor<T> : Editor

protected List<PropertyField[]> pInfoList = new List<PropertyField[]>();

GUIStyle brown;

public virtual void OnEnable()
{
brown = new GUIStyle("box");
brown.normal.background = Resources.Load("brown", typeof(Texture2D)) as Texture2D;
brown.border = new RectOffset(4, 4, 4, 4);
brown.margin = new RectOffset(3, 3, 3, 3);
brown.padding = new RectOffset(4, 4, 4, 4);
}

public override void OnInspectorGUI()
Expand All @@ -51,7 +58,9 @@ public override void OnInspectorGUI()

foreach (PropertyField[] p in pInfoList)
{
GUILayout.BeginVertical(brown);
ExposeProperties.Expose(p);
GUILayout.EndVertical();
}
}

Expand Down
20 changes: 12 additions & 8 deletions Assets/QuickSheet/GDataPlugin/Editor/BaseGoogleEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@
///
/// A BaseEditor class.
///
public class BaseGoogleEditor<T> : Editor //where T : BaseDatabase
public class BaseGoogleEditor<T> : Editor
{
// custom data
//protected BaseDatabase database;

// property draw
protected PropertyField[] databaseFields;
protected PropertyField[] dataFields;

protected List<PropertyField[]> pInfoList = new List<PropertyField[]>();


GUIStyle brown;

///
/// Actively ignore security concerns to resolve TlsException error.
///
Expand Down Expand Up @@ -69,8 +68,11 @@ public virtual void OnEnable()
return;
}

//database = target as BaseDatabase;
//Debug.Log ("Target type: " + database.GetType().ToString());
brown = new GUIStyle("box");
brown.normal.background = Resources.Load("brown", typeof(Texture2D)) as Texture2D;
brown.border = new RectOffset(4, 4, 4, 4);
brown.margin = new RectOffset(3, 3, 3, 3);
brown.padding = new RectOffset(4, 4, 4, 4);
}

public override void OnInspectorGUI()
Expand All @@ -91,7 +93,9 @@ public override void OnInspectorGUI()

foreach(PropertyField[] p in pInfoList)
{
ExposeProperties.Expose( p );
GUILayout.BeginVertical(brown);
ExposeProperties.Expose( p );
GUILayout.EndVertical();
}
}

Expand Down

0 comments on commit 79beead

Please sign in to comment.