Skip to content
This repository was archived by the owner on Feb 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #154 from Henry00IS/2DSERestore
Browse files Browse the repository at this point in the history
2DSE: Replaced "Load Project" with "Restore Project"
  • Loading branch information
Henry00IS authored Jun 18, 2018
2 parents efddf25 + d8354ce commit 1887f26
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 3 deletions.
Binary file added Gizmos/ShapeEditorRestore.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 Gizmos/ShapeEditorRestore.png.meta

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

Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ public override void DoInspectorGUI()
{
GUILayout.BeginHorizontal(EditorStyles.toolbar);
GUIStyle createBrushStyle = new GUIStyle(EditorStyles.toolbarButton);
if (GUILayout.Button(new GUIContent(" Show Editor", SabreCSGResources.ButtonShapeEditorTexture, "Show 2D Shape Editor"), createBrushStyle))
if (GUILayout.Button(new GUIContent(" Shape Editor", SabreCSGResources.ButtonShapeEditorTexture, "Show 2D Shape Editor"), createBrushStyle))
{
// display the 2d shape ditor.
ShapeEditorWindow.Init();
}
if (GUILayout.Button(new GUIContent(" Load Project", SabreCSGResources.ShapeEditorOpenTexture, "Load Embedded Project Into 2D Shape Editor"), createBrushStyle))
if (GUILayout.Button(new GUIContent(" Restore Project", SabreCSGResources.ShapeEditorRestoreTexture, "Load Embedded Project Into 2D Shape Editor"), createBrushStyle))
{
if (EditorUtility.DisplayDialog("2D Shape Editor", "Are you sure you wish to load the embedded project?\r\nAny unsaved work in the 2D Shape Editor will be lost!", "Yes", "No"))
if (EditorUtility.DisplayDialog("2D Shape Editor", "Are you sure you wish to restore the embedded project?\r\nAny unsaved work in the 2D Shape Editor will be lost!", "Yes", "No"))
{
// display the 2d shape ditor.
ShapeEditorWindow window = ShapeEditorWindow.InitAndGetHandle();
Expand Down
8 changes: 8 additions & 0 deletions Scripts/UI/SabreCSGResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,14 @@ public static Texture2D ShapeEditorOpenTexture
}
}

public static Texture2D ShapeEditorRestoreTexture
{
get
{
return (Texture2D)LoadObject("Gizmos/ShapeEditorRestore.png");
}
}

public static Texture2D ShapeEditorRotate90LeftTexture
{
get
Expand Down

0 comments on commit 1887f26

Please sign in to comment.