Skip to content
Snippets Groups Projects
Commit 0a5139c2 authored by Stefan Richter's avatar Stefan Richter
Browse files

Added Option to enable/disable Autoselect for FrameITUI Prefabs.

parent 459d656e
Branches
No related tags found
No related merge requests found
...@@ -110,7 +110,7 @@ void start2_CheckOS_CheckConfig() ...@@ -110,7 +110,7 @@ void start2_CheckOS_CheckConfig()
NetworkJSON_Save(); NetworkJSON_Save();
//Debug.Log("StartAdaption"); //Debug.Log("StartAdaption");
if (autoSettingsAdaption) if (autoSettingsAdaption>0)
{ {
changeSettingsToOS(); changeSettingsToOS();
NetworkJSON_Save(); NetworkJSON_Save();
...@@ -199,11 +199,11 @@ void changeSettingsToOS() ...@@ -199,11 +199,11 @@ void changeSettingsToOS()
{ {
case OperationSystem.Windows: case OperationSystem.Windows:
UIconfig.controlMode = ControlMode.Keyboard; UIconfig.controlMode = ControlMode.Keyboard;
UIconfig.FrameITUIversion = 1; if (autoSettingsAdaption == 2) { UIconfig.FrameITUIversion = 1; }
break; break;
case OperationSystem.Android: case OperationSystem.Android:
UIconfig.controlMode = ControlMode.Mobile; UIconfig.controlMode = ControlMode.Mobile;
UIconfig.FrameITUIversion = 2; if (autoSettingsAdaption == 2) { UIconfig.FrameITUIversion = 2; }
break; break;
default: default:
break; break;
......
...@@ -63,19 +63,30 @@ void UpdateUI_6() ...@@ -63,19 +63,30 @@ void UpdateUI_6()
switch (UIconfig.autoSettingsAdaption) switch (UIconfig.autoSettingsAdaption)
{ {
case false: case 0:
//GameObject.Find("TextSlotTOO").GetComponent<Text>().text = "Touch controls OFF"; //GameObject.Find("TextSlotTOO").GetComponent<Text>().text = "Touch controls OFF";
AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: OFF"; AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: OFF";
AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for activating"; AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for activating";
break; break;
case true: case 1:
AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: Input";
AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for changing";
break;
AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: ON"; case 2:
AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: Input & UI";
AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for deactivating"; AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for deactivating";
break; break;
default:
AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: OFF";
AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for activating";
break;
} }
...@@ -142,44 +153,38 @@ public void ChangeAutoOSrecognition() ...@@ -142,44 +153,38 @@ public void ChangeAutoOSrecognition()
{ {
case false: case false:
CommunicationEvents.autoOSrecognition = true; CommunicationEvents.autoOSrecognition = true;
AutoOSreq_ButtonT.GetComponent<Text>().text = "Operating System Recognition: ON";
AutoOSreq_ButtonUT.GetComponentInChildren<Text>().text = "Press for deactivating";
break; break;
case true: case true:
CommunicationEvents.autoOSrecognition = false; CommunicationEvents.autoOSrecognition = false;
//GameObject.Find("TextSlotTOO").GetComponent<Text>().text = "Touch controls OFF";
AutoOSreq_ButtonT.GetComponent<Text>().text = "Operating System Recognition: OFF";
AutoOSreq_ButtonUT.GetComponentInChildren<Text>().text = "Press for activating";
break; break;
} }
//updateUIpreview();
NetworkJSON_Save(); NetworkJSON_Save();
UpdateUI_6();
} }
public void ChangeAutoSettingsAdaption() public void ChangeAutoSettingsAdaption()
{ {
switch (UIconfig.autoSettingsAdaption) switch (UIconfig.autoSettingsAdaption)
{ {
case false: case 0:
UIconfig.autoSettingsAdaption = true; UIconfig.autoSettingsAdaption = 1;
AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: ON";
AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for deactivating";
break; break;
case true: case 1:
UIconfig.autoSettingsAdaption = false; UIconfig.autoSettingsAdaption = 2;
//GameObject.Find("TextSlotTOO").GetComponent<Text>().text = "Touch controls OFF"; break;
AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: OFF"; case 2:
AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for activating"; UIconfig.autoSettingsAdaption = 0;
break;
default:
UIconfig.autoSettingsAdaption = 0;
break; break;
} }
//updateUIpreview(); //updateUIpreview();
NetworkJSON_Save(); NetworkJSON_Save();
UpdateUI_6();
} }
......
...@@ -11,7 +11,7 @@ public static class UIconfig ...@@ -11,7 +11,7 @@ public static class UIconfig
public static int GameplayMode = 5; //5=First Person, 4=third, 3=third+, 2=Escaperoom, 1=Sidescroller, 0=Sidescroller+ public static int GameplayMode = 5; //5=First Person, 4=third, 3=third+, 2=Escaperoom, 1=Sidescroller, 0=Sidescroller+
public static bool InputDisable = false; //deactivate all Objects with access to the input system, so Bindings can be rebinded. public static bool InputDisable = false; //deactivate all Objects with access to the input system, so Bindings can be rebinded.
public static bool autoSettingsAdaption = false; public static int autoSettingsAdaption = 0; //0=Aus, 1=OnlyInput, 2=Input&UIV
public static float cursorMaxRange_fromFirstPersonView = 10f; //used in World cursor public static float cursorMaxRange_fromFirstPersonView = 10f; //used in World cursor
public static float cursorMaxRange_fromObeserverView = float.MaxValue; //used in World cursor public static float cursorMaxRange_fromObeserverView = float.MaxValue; //used in World cursor
...@@ -116,7 +116,7 @@ public class NetworkJSON ...@@ -116,7 +116,7 @@ public class NetworkJSON
public int TouchMode; public int TouchMode;
public float TAvisibility; public float TAvisibility;
public bool autoOSrecognition; public bool autoOSrecognition;
public bool autoSettingsAdaption; public int autoSettingsAdaption;
public string Opsys; public string Opsys;
public int FrameITUIversion; public int FrameITUIversion;
public int InputManagerVersion; public int InputManagerVersion;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"TouchMode": 1, "TouchMode": 1,
"TAvisibility": 1.0, "TAvisibility": 1.0,
"autoOSrecognition": true, "autoOSrecognition": true,
"autoSettingsAdaption": true, "autoSettingsAdaption": 1,
"Opsys": "Android", "Opsys": "Android",
"FrameITUIversion": 2, "FrameITUIversion": 2,
"InputManagerVersion": 1, "InputManagerVersion": 1,
......
{ {
"lastIP": "", "lastIP": "",
"newIP": "", "newIP": "",
"IPslot1": "uframeit.informatik.uni-erlangen.de:8085", "IPslot1": "devel.uframeit.informatik.uni-erlangen.de:8088",
"IPslot2": "uframeit.informatik.uni-erlangen.de:8086", "IPslot2": "master.uframeit.informatik.uni-erlangen.de:8087",
"IPslot3": "", "IPslot3": "stable.uframeit.informatik.uni-erlangen.de:8086",
"IPslot4": "oldstable.uframeit.informatik.uni-erlangen.de:8085",
"IPslot5": "uframeit.informatik.uni-erlangen.de:8089",
"selecIP": "", "selecIP": "",
"ControlMode": "Keyboard", "ControlMode": "Keyboard",
"TouchMode": 1, "TouchMode": 1,
"TAvisibility": 1.0, "TAvisibility": 1.0,
"autoOSrecognition": true, "autoOSrecognition": true,
"Opsys": "Windows", "autoSettingsAdaption": 2,
"Opsys": "Android",
"FrameITUIversion": 2, "FrameITUIversion": 2,
"InputManagerVersion": 1, "InputManagerVersion": 1,
"colliderScale_all": 1.200000047683716, "colliderScale_all": 1.200000047683716,
"cursorSize": 0.03125, "cursorSize": 0.03125,
"camRotatingSensitivity": 2.0, "camRotatingSensitivity": 2.0,
"MouseKeepingInWindow": true "MouseKeepingInWindow": true,
"scrolldirection": -1
} }
\ No newline at end of file
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3315a92b25ce53341976adc3f09d173e guid: ffa3cc5a8ea56dc4b8c5e907de1f715a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment