Skip to content
This repository has been archived by the owner on Jun 26, 2021. It is now read-only.

Commit

Permalink
Merge with Embeddedt master
Browse files Browse the repository at this point in the history
  • Loading branch information
FritzsHero committed Jul 10, 2019
1 parent a1027ce commit 48ed949
Show file tree
Hide file tree
Showing 116 changed files with 9,825 additions and 10,774 deletions.
23 changes: 10 additions & 13 deletions Editor/GSDEditorProgressWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#endif
using UnityEngine;


/// <summary>
/// Used for progress information for other areas of RA.
/// </summary>
Expand All @@ -13,45 +12,43 @@ public class GSDEditorProgressWindow : EditorWindow
float startVal = 0f;
float progress = 0f;


#if UNITY_EDITOR
static void Init()
{
GSDEditorProgressWindow window = (GSDEditorProgressWindow) EditorWindow.GetWindow( typeof( GSDEditorProgressWindow ) );
window.Show( );
GSDEditorProgressWindow window = (GSDEditorProgressWindow)EditorWindow.GetWindow(typeof(GSDEditorProgressWindow));
window.Show();
}
#endif


#if UNITY_EDITOR
void OnGUI()
{
secs = EditorGUILayout.FloatField( "Time to wait:", secs );
if (GUILayout.Button( "Display bar" ))
secs = EditorGUILayout.FloatField("Time to wait:", secs);
if (GUILayout.Button("Display bar"))
{
if (secs < 1)
{
Debug.LogError( "Seconds should be bigger than 1" );
Debug.LogError("Seconds should be bigger than 1");
return;
}
startVal = (float) EditorApplication.timeSinceStartup;
startVal = (float)EditorApplication.timeSinceStartup;
}

if (progress < secs)
EditorUtility.DisplayProgressBar(
"Simple Progress Bar",
"Shows a progress bar for the given seconds",
progress / secs );
progress / secs);
else
EditorUtility.ClearProgressBar( );
EditorUtility.ClearProgressBar();

progress = (float) ( EditorApplication.timeSinceStartup - startVal );
progress = (float)(EditorApplication.timeSinceStartup - startVal);
}


void OnInspectorUpdate()
{
Repaint( );
Repaint();
}
#endif
}
27 changes: 12 additions & 15 deletions Editor/GSDHelpWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,35 @@
using UnityEngine;
using UnityEditor;
#endregion


public class GSDHelpWindow : EditorWindow
{
void OnGUI()
{
EditorStyles.label.wordWrap = true;
EditorStyles.miniLabel.wordWrap = true;

EditorGUILayout.LabelField( "Road Architect Help", EditorStyles.boldLabel );
EditorGUILayout.LabelField( "Please visit the online manual for help." );
GUILayout.Space( 4f );
EditorGUILayout.LabelField("Road Architect Help", EditorStyles.boldLabel);
EditorGUILayout.LabelField("Please visit the online manual for help.");
GUILayout.Space(4f);

if (GUILayout.Button( "Click here to open online manual", EditorStyles.miniButton, GUILayout.Width( 300f ) ))
if (GUILayout.Button("Click here to open online manual", EditorStyles.miniButton, GUILayout.Width(300f)))
{
Application.OpenURL( "http://microgsd.com/Support.aspx" );
Application.OpenURL("http://microgsd.com/Support.aspx");
}

EditorGUILayout.LabelField( "http://microgsd.com/Support.aspx", EditorStyles.miniLabel );
GUILayout.Space( 4f );
EditorGUILayout.LabelField( "Please visit the online manual for help.", EditorStyles.miniLabel );
GUILayout.Space( 4f );
EditorGUILayout.LabelField( "Please visit our unity forum thread or contact [email protected] with any questions or comments.", EditorStyles.miniLabel );
EditorGUILayout.LabelField("http://microgsd.com/Support.aspx", EditorStyles.miniLabel);
GUILayout.Space(4f);
EditorGUILayout.LabelField("Please visit the online manual for help.", EditorStyles.miniLabel);
GUILayout.Space(4f);
EditorGUILayout.LabelField("Please visit our unity forum thread or contact [email protected] with any questions or comments.", EditorStyles.miniLabel);
}


#region "Init"
public void Initialize()
{
Rect fRect = new Rect( 340, 170, 420, 180 );
Rect fRect = new Rect(340, 170, 420, 180);
position = fRect;
Show( );
Show();
titleContent.text = "Help Info";
}
#endregion
Expand Down
18 changes: 7 additions & 11 deletions Editor/GSDNotification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,28 @@
using UnityEditor;
using System.Collections;


/// <summary>
/// Used for notifications in other areas of RA.
/// </summary>
public class GSDNotification : EditorWindow
{
string notification = "This is a Notification";


static void Initialize()
{
GSDNotification window = EditorWindow.GetWindow<GSDNotification>( );
window.Show( );
GSDNotification window = EditorWindow.GetWindow<GSDNotification>();
window.Show();
}


void OnGUI()
{
notification = EditorGUILayout.TextField( notification );
if (GUILayout.Button( "Show Notification" ))
notification = EditorGUILayout.TextField(notification);
if (GUILayout.Button("Show Notification"))
{
this.ShowNotification( new GUIContent( notification ) );
this.ShowNotification(new GUIContent(notification));
}
if (GUILayout.Button( "Remove Notification" ))
if (GUILayout.Button("Remove Notification"))
{
this.RemoveNotification( );
this.RemoveNotification();
}
}
}
Loading

0 comments on commit 48ed949

Please sign in to comment.