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
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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();
}
......
......@@ -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;
......
......@@ -11,7 +11,7 @@
"TouchMode": 1,
"TAvisibility": 1.0,
"autoOSrecognition": true,
"autoSettingsAdaption": true,
"autoSettingsAdaption": 1,
"Opsys": "Android",
"FrameITUIversion": 2,
"InputManagerVersion": 1,
......
{
"lastIP": "",
"newIP": "",
"IPslot1": "uframeit.informatik.uni-erlangen.de:8085",
"IPslot2": "uframeit.informatik.uni-erlangen.de:8086",
"IPslot3": "",
"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,
"Opsys": "Windows",
"autoSettingsAdaption": 2,
"Opsys": "Android",
"FrameITUIversion": 2,
"InputManagerVersion": 1,
"colliderScale_all": 1.200000047683716,
"cursorSize": 0.03125,
"camRotatingSensitivity": 2.0,
"MouseKeepingInWindow": true
"MouseKeepingInWindow": true,
"scrolldirection": -1
}
\ No newline at end of file
fileFormatVersion: 2
guid: 3315a92b25ce53341976adc3f09d173e
guid: ffa3cc5a8ea56dc4b8c5e907de1f715a
DefaultImporter:
externalObjects: {}
userData:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment