diff --git a/Assets/Scripts/UI/NetwMenu/StartMenu_mobile.cs b/Assets/Scripts/UI/NetwMenu/StartMenu_mobile.cs index 3e4e83b7d92d03cd5705d67520d5777ba1b4a9a4..c27ffc8c22cf2a0255dbfb4ea81feb776c7b5924 100644 --- a/Assets/Scripts/UI/NetwMenu/StartMenu_mobile.cs +++ b/Assets/Scripts/UI/NetwMenu/StartMenu_mobile.cs @@ -110,7 +110,7 @@ void start2_CheckOS_CheckConfig() NetworkJSON_Save(); //Debug.Log("StartAdaption"); - if (autoSettingsAdaption) + if (autoSettingsAdaption>0) { changeSettingsToOS(); NetworkJSON_Save(); @@ -199,11 +199,11 @@ void changeSettingsToOS() { case OperationSystem.Windows: UIconfig.controlMode = ControlMode.Keyboard; - UIconfig.FrameITUIversion = 1; + if (autoSettingsAdaption == 2) { UIconfig.FrameITUIversion = 1; } break; case OperationSystem.Android: UIconfig.controlMode = ControlMode.Mobile; - UIconfig.FrameITUIversion = 2; + if (autoSettingsAdaption == 2) { UIconfig.FrameITUIversion = 2; } break; default: break; diff --git a/Assets/Scripts/UI/NetwMenu/SystemOptionsMenu_mobile.cs b/Assets/Scripts/UI/NetwMenu/SystemOptionsMenu_mobile.cs index 8b682d43fca3abc1040c92c9db1b6c5c15942b05..db5a5b27edc2b2456a7ca6f906fa4b6931f08060 100644 --- a/Assets/Scripts/UI/NetwMenu/SystemOptionsMenu_mobile.cs +++ b/Assets/Scripts/UI/NetwMenu/SystemOptionsMenu_mobile.cs @@ -63,19 +63,30 @@ void UpdateUI_6() switch (UIconfig.autoSettingsAdaption) { - case false: + case 0: //GameObject.Find("TextSlotTOO").GetComponent<Text>().text = "Touch controls OFF"; AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: OFF"; AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for activating"; 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"; 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() { case false: CommunicationEvents.autoOSrecognition = true; - AutoOSreq_ButtonT.GetComponent<Text>().text = "Operating System Recognition: ON"; - AutoOSreq_ButtonUT.GetComponentInChildren<Text>().text = "Press for deactivating"; break; case true: 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; - - } - //updateUIpreview(); NetworkJSON_Save(); + UpdateUI_6(); + } public void ChangeAutoSettingsAdaption() { switch (UIconfig.autoSettingsAdaption) { - case false: - UIconfig.autoSettingsAdaption = true; - AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: ON"; - AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for deactivating"; + case 0: + UIconfig.autoSettingsAdaption = 1; break; - case true: - UIconfig.autoSettingsAdaption = false; - //GameObject.Find("TextSlotTOO").GetComponent<Text>().text = "Touch controls OFF"; - AutoSettingsAdap_Button.GetComponent<Text>().text = "Settings Adaption: OFF"; - AutoSettingsAdap_ButtonUT.GetComponentInChildren<Text>().text = "Press for activating"; + case 1: + UIconfig.autoSettingsAdaption = 2; + break; + case 2: + UIconfig.autoSettingsAdaption = 0; + break; + default: + UIconfig.autoSettingsAdaption = 0; break; - - } //updateUIpreview(); NetworkJSON_Save(); + UpdateUI_6(); } diff --git a/Assets/Scripts/UI/UIconfig.cs b/Assets/Scripts/UI/UIconfig.cs index 2f056db8edbc86332371a62a56b1874f2dacda3b..4250cb104355a82048fce2cb3426eb7b6b717595 100644 --- a/Assets/Scripts/UI/UIconfig.cs +++ b/Assets/Scripts/UI/UIconfig.cs @@ -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 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_fromObeserverView = float.MaxValue; //used in World cursor @@ -116,7 +116,7 @@ public class NetworkJSON public int TouchMode; public float TAvisibility; public bool autoOSrecognition; - public bool autoSettingsAdaption; + public int autoSettingsAdaption; public string Opsys; public int FrameITUIversion; public int InputManagerVersion; diff --git a/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network.JSON b/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network.JSON index bd80ffd55145e37372fa34381fb828517d59ffd9..eb50d80634abf076304e51be7fcbd575c0dea88c 100644 --- a/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network.JSON +++ b/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network.JSON @@ -11,7 +11,7 @@ "TouchMode": 1, "TAvisibility": 1.0, "autoOSrecognition": true, - "autoSettingsAdaption": true, + "autoSettingsAdaption": 1, "Opsys": "Android", "FrameITUIversion": 2, "InputManagerVersion": 1, diff --git a/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup.json b/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup.json deleted file mode 100644 index a261a61d1aa689cf1841dc450358b5d2b641d5ab..0000000000000000000000000000000000000000 --- a/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "lastIP": "", - "newIP": "", - "IPslot1": "uframeit.informatik.uni-erlangen.de:8085", - "IPslot2": "uframeit.informatik.uni-erlangen.de:8086", - "IPslot3": "", - "selecIP": "", - "ControlMode": "Keyboard", - "TouchMode": 1, - "TAvisibility": 1.0, - "autoOSrecognition": true, - "Opsys": "Windows", - "FrameITUIversion": 2, - "InputManagerVersion": 1, - "colliderScale_all": 1.200000047683716, - "cursorSize": 0.03125, - "camRotatingSensitivity": 2.0, - "MouseKeepingInWindow": true -} \ No newline at end of file diff --git a/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup_withAuto.JSON b/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup_withAuto.JSON new file mode 100644 index 0000000000000000000000000000000000000000..9d3f665c4a6c921c3e71c4da1d5026cb0b116c62 --- /dev/null +++ b/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup_withAuto.JSON @@ -0,0 +1,23 @@ +{ + "lastIP": "", + "newIP": "", + "IPslot1": "devel.uframeit.informatik.uni-erlangen.de:8088", + "IPslot2": "master.uframeit.informatik.uni-erlangen.de:8087", + "IPslot3": "stable.uframeit.informatik.uni-erlangen.de:8086", + "IPslot4": "oldstable.uframeit.informatik.uni-erlangen.de:8085", + "IPslot5": "uframeit.informatik.uni-erlangen.de:8089", + "selecIP": "", + "ControlMode": "Keyboard", + "TouchMode": 1, + "TAvisibility": 1.0, + "autoOSrecognition": true, + "autoSettingsAdaption": 2, + "Opsys": "Android", + "FrameITUIversion": 2, + "InputManagerVersion": 1, + "colliderScale_all": 1.200000047683716, + "cursorSize": 0.03125, + "camRotatingSensitivity": 2.0, + "MouseKeepingInWindow": true, + "scrolldirection": -1 +} \ No newline at end of file diff --git a/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup.json.meta b/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup_withAuto.JSON.meta similarity index 74% rename from Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup.json.meta rename to Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup_withAuto.JSON.meta index ca8a78ddfc56ec9b1c2afbed317d71b501deb92f..b73bb3f1cf142779984cadc125dd86601dc96e36 100644 --- a/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup.json.meta +++ b/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network_Backup_withAuto.JSON.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3315a92b25ce53341976adc3f09d173e +guid: ffa3cc5a8ea56dc4b8c5e907de1f715a DefaultImporter: externalObjects: {} userData: