diff --git a/engine/unity4/Assets/resources/Images/blueBackground.xcf.meta b/engine/unity4/Assets/resources/Images/blueBackground.xcf.meta deleted file mode 100644 index 613eb98fbb..0000000000 --- a/engine/unity4/Assets/resources/Images/blueBackground.xcf.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: e702fe4d4c1599a4285290eb40c6588c -DefaultImporter: - userData: diff --git a/engine/unity4/Assets/resources/Images/darkGreyBackground.xcf.meta b/engine/unity4/Assets/resources/Images/darkGreyBackground.xcf.meta deleted file mode 100644 index d5935eddbf..0000000000 --- a/engine/unity4/Assets/resources/Images/darkGreyBackground.xcf.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: c430060cb8e48844e838a39b753036ab -DefaultImporter: - userData: diff --git a/engine/unity4/Assets/resources/Images/greyBackground.xcf.meta b/engine/unity4/Assets/resources/Images/greyBackground.xcf.meta deleted file mode 100644 index 25c25ce384..0000000000 --- a/engine/unity4/Assets/resources/Images/greyBackground.xcf.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 6ef015817c24bdd4fb867d3c11d61d2e -DefaultImporter: - userData: diff --git a/engine/unity4/Assets/resources/Images/greyButton.xcf.meta b/engine/unity4/Assets/resources/Images/greyButton.xcf.meta deleted file mode 100644 index 49c9fd89e4..0000000000 --- a/engine/unity4/Assets/resources/Images/greyButton.xcf.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 97612f4b9e167a7458251f50aa10b9f3 -DefaultImporter: - userData: diff --git a/engine/unity4/Assets/resources/Images/lightGreyBackground.xcf.meta b/engine/unity4/Assets/resources/Images/lightGreyBackground.xcf.meta deleted file mode 100644 index d9d9ae3037..0000000000 --- a/engine/unity4/Assets/resources/Images/lightGreyBackground.xcf.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 43ffd77605f942246af03aef717542a6 -DefaultImporter: - userData: diff --git a/engine/unity4/Assets/resources/Images/transparentBackground.xcf.meta b/engine/unity4/Assets/resources/Images/transparentBackground.xcf.meta deleted file mode 100644 index e652657b46..0000000000 --- a/engine/unity4/Assets/resources/Images/transparentBackground.xcf.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: b41ec88b965e9664abf786122da10f20 -DefaultImporter: - userData: diff --git a/engine/unity4/Assets/scripts/GUI/MainMenu.cs b/engine/unity4/Assets/scripts/GUI/MainMenu.cs index 19e24bc744..8a91e183be 100644 --- a/engine/unity4/Assets/scripts/GUI/MainMenu.cs +++ b/engine/unity4/Assets/scripts/GUI/MainMenu.cs @@ -85,11 +85,27 @@ void OnGUI () switch (currentTab) { case Tab.FieldDir: - if (!customfieldon || !fieldBrowser.Active) SwitchTabSim(); + if (customfieldon && !fieldBrowser.Active) + { + currentTab = Tab.Sim; + + homeTab.SetActive(false); + optionsTab.SetActive(false); + simTab.SetActive(true); + customfieldon = false; + } break; case Tab.RobotDir: - if (!customroboton || !robotBrowser.Active) SwitchTabSim(); + if (customroboton && !robotBrowser.Active) + { + currentTab = Tab.Sim; + + homeTab.SetActive(false); + optionsTab.SetActive(false); + simTab.SetActive(true); + customroboton = false; + } break; } InitFieldBrowser(); @@ -109,6 +125,7 @@ public void SwitchTabHome() optionsTab.SetActive(false); homeTab.SetActive(true); } + else UserMessageManager.Dispatch("You must select a directory or exit first!",3); } public void SwitchTabSim() @@ -121,6 +138,7 @@ public void SwitchTabSim() optionsTab.SetActive(false); simTab.SetActive(true); } + else UserMessageManager.Dispatch("You must select a directory or exit first!", 3); } public void SwitchTabOptions() @@ -133,6 +151,7 @@ public void SwitchTabOptions() simTab.SetActive(false); optionsTab.SetActive(true); } + else UserMessageManager.Dispatch("You must select a directory or exit first!", 3); } public void SwitchSimSelection() @@ -272,25 +291,28 @@ public void SwitchDPMConfiguration() driverPracticeMode.SetActive(false); dpmConfiguration.SetActive(true); - string line = ""; - int counter = 0; - StreamReader reader = new StreamReader(PlayerPrefs.GetString("dpmSelectedRobot") + "\\dpmConfiguration.txt"); - - string fieldName = ""; - while ((line = reader.ReadLine()) != null) + if (File.Exists(dpmSelectedRobot + "\\dpmConfiguration.txt")) { - if (line.Equals("#Field")) counter++; - else if (counter == 1) + string line = ""; + int counter = 0; + StreamReader reader = new StreamReader(dpmSelectedRobot + "\\dpmConfiguration.txt"); + + string fieldName = ""; + while ((line = reader.ReadLine()) != null) { - fieldName = line; - break; + if (line.Equals("#Field")) counter++; + else if (counter == 1) + { + fieldName = line; + break; + } } + reader.Close(); + configurationText.GetComponent().text = "Robot Status: Configured For " + fieldName + ""; } - - if (File.Exists(dpmSelectedRobot + "\\dpmConfiguration.txt")) configurationText.GetComponent().text = "Robot Status: Configured For " + fieldName + ""; else configurationText.GetComponent().text = "Robot Status: NOT CONFIGURED"; - reader.Close(); + } else UserMessageManager.Dispatch("No Robot/Field Selected!", 5); } @@ -456,8 +478,12 @@ public void InitFieldBrowser() public void LoadFieldDirectory() { - if (!fieldBrowser.Active) fieldBrowser.Active = true; + if (!fieldBrowser.Active) + { + fieldBrowser.Active = true; + } customfieldon = true; + currentTab = Tab.FieldDir; } public void InitRobotBrowser() @@ -492,8 +518,12 @@ public void InitRobotBrowser() public void LoadRobotDirectory() { - if (!robotBrowser.Active) robotBrowser.Active = true; + if (!robotBrowser.Active) + { + robotBrowser.Active = true; + } customroboton = true; + currentTab = Tab.RobotDir; } #endregion @@ -612,7 +642,9 @@ public void SelectDPMRobot() } #endregion void Start () { + FindAllGameObjects(); + splashScreen.SetActive(true); InitGraphicsSettings(); fields = new ArrayList(); robots = new ArrayList(); @@ -637,7 +669,7 @@ void Start () { customfieldon = false; customroboton = false; - + ApplyGraphics(); if (currentSim != Sim.Selection) { if (currentSim == Sim.DPMConfiguration) @@ -660,6 +692,7 @@ void Start () { SwitchSimSelection(); } + } void FindAllGameObjects() { @@ -729,7 +762,5 @@ void InitGraphicsSettings() else if (width == xresolution[8] && height == yresolution[8]) resolutionsetting = 8; else if (width == xresolution[9] && height == yresolution[9]) resolutionsetting = 9; else resolutionsetting = 2; - - ApplyGraphics(); } } diff --git a/engine/unity4/Assets/scripts/GUI/UserMessageManager.cs b/engine/unity4/Assets/scripts/GUI/UserMessageManager.cs index 6a89707e24..fdf74c1521 100644 --- a/engine/unity4/Assets/scripts/GUI/UserMessageManager.cs +++ b/engine/unity4/Assets/scripts/GUI/UserMessageManager.cs @@ -89,7 +89,7 @@ public static void Render() GUI.color = fg; GUI.backgroundColor = bg; GUIContent content = new GUIContent(msg.message); - Vector2 size = GUI.skin.GetStyle("Button").CalcSize(content)*scale; + Vector2 size = GUI.skin.GetStyle("Button").CalcSize(content); if (GUI.Button(new Rect((WIDTH - size.x) / 2f, HEIGHT - y - size.y, size.x, size.y), content)) { msg.ttl = -1; diff --git a/launcher/bin/Release/Synthesis/Assets/resources/Materials/Thumbs.db b/launcher/bin/Release/Synthesis/Assets/resources/Materials/Thumbs.db new file mode 100644 index 0000000000..f937b71206 Binary files /dev/null and b/launcher/bin/Release/Synthesis/Assets/resources/Materials/Thumbs.db differ