diff --git a/Assets/Resources/Prefabs/UI/FrameITUI.prefab b/Assets/Resources/Prefabs/UI/FrameITUI.prefab index 9130e4e6374bc17fd304713b899dd27603fd17dc..65acbc15fe196c7dfbb4c026623bf53ac4d6bafc 100644 --- a/Assets/Resources/Prefabs/UI/FrameITUI.prefab +++ b/Assets/Resources/Prefabs/UI/FrameITUI.prefab @@ -556,7 +556,7 @@ PrefabInstance: - target: {fileID: 6500467619489830996, guid: 292834880e6f0e54186b873acc62d3f2, type: 3} propertyPath: m_AnchoredPosition.y - value: 3240 + value: 443880 objectReference: {fileID: 0} - target: {fileID: 7849991042685492731, guid: 292834880e6f0e54186b873acc62d3f2, type: 3} @@ -606,7 +606,7 @@ PrefabInstance: - target: {fileID: 7989559431199338490, guid: 292834880e6f0e54186b873acc62d3f2, type: 3} propertyPath: m_AnchoredPosition.y - value: -179.99953 + value: -24660 objectReference: {fileID: 0} - target: {fileID: 8004702056544321748, guid: 292834880e6f0e54186b873acc62d3f2, type: 3} diff --git a/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab b/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab index 2e886ae5333e176f29e917921215e5ec1cba871e..bce53f30c5f5a70aee33e6a05017c31e44efa1fe 100644 --- a/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab +++ b/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab @@ -4952,7 +4952,7 @@ PrefabInstance: - target: {fileID: 7989559431199338490, guid: 292834880e6f0e54186b873acc62d3f2, type: 3} propertyPath: m_AnchoredPosition.y - value: -100.000046 + value: -1700 objectReference: {fileID: 0} - target: {fileID: 8004702056544321748, guid: 292834880e6f0e54186b873acc62d3f2, type: 3} @@ -5319,12 +5319,12 @@ PrefabInstance: - target: {fileID: 8553388048532215990, guid: 884ac57de337c364391b247761071fb1, type: 3} propertyPath: m_AnchorMax.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 8553388048532215990, guid: 884ac57de337c364391b247761071fb1, type: 3} propertyPath: m_AnchorMin.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 8553388048532215990, guid: 884ac57de337c364391b247761071fb1, type: 3} @@ -5339,7 +5339,7 @@ PrefabInstance: - target: {fileID: 8553388048532215990, guid: 884ac57de337c364391b247761071fb1, type: 3} propertyPath: m_AnchoredPosition.x - value: 30 + value: 650 objectReference: {fileID: 0} - target: {fileID: 8553388048532215990, guid: 884ac57de337c364391b247761071fb1, type: 3} diff --git a/Assets/Resources/Prefabs/UI/Ingame/GadgetCanvas.prefab b/Assets/Resources/Prefabs/UI/Ingame/GadgetCanvas.prefab index f4fa3f780801052b4b41d65697dc2c72a75ef37a..b67e0e696ab7c32fac8cc4b402e330b0e01f0126 100644 --- a/Assets/Resources/Prefabs/UI/Ingame/GadgetCanvas.prefab +++ b/Assets/Resources/Prefabs/UI/Ingame/GadgetCanvas.prefab @@ -174,7 +174,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchoredPosition: {x: 940, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &6662492270148709753 @@ -538,7 +538,7 @@ MonoBehaviour: m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 + m_PresetInfoIsWorld: 1 --- !u!1001 &3122257488954702478 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/Prefabs/UI/Ingame/HidingCanvas.prefab b/Assets/Resources/Prefabs/UI/Ingame/HidingCanvas.prefab index b64e98e9015c597c3951f1d8fb2df6887751ecae..c78ab03bee1236f88576a3a8651b3f96bd3ce6ae 100644 --- a/Assets/Resources/Prefabs/UI/Ingame/HidingCanvas.prefab +++ b/Assets/Resources/Prefabs/UI/Ingame/HidingCanvas.prefab @@ -35,7 +35,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0.0009765625} + m_AnchoredPosition: {x: 0, y: 1080} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 1} --- !u!114 &6592514254180342026 @@ -2828,6 +2828,7 @@ GameObject: - component: {fileID: 8004702057932254678} - component: {fileID: 8004702057932254679} - component: {fileID: 8004702057932254676} + - component: {fileID: 3671007757941716709} m_Layer: 5 m_Name: HidingCanvas m_TagString: Untagged @@ -2907,7 +2908,7 @@ MonoBehaviour: m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 + m_PresetInfoIsWorld: 1 --- !u!114 &8004702057932254676 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2925,6 +2926,20 @@ MonoBehaviour: m_BlockingMask: serializedVersion: 2 m_Bits: 4294967295 +--- !u!114 &3671007757941716709 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8004702057932254674} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90c1c0815499367409841816e1485ec7, type: 3} + m_Name: + m_EditorClassIdentifier: + ScrollShowUI: {fileID: 8004702057540368332} + ScrollWebView: {fileID: 5843063412347785762} --- !u!1 &8004702058016740896 GameObject: m_ObjectHideFlags: 0 @@ -3701,7 +3716,7 @@ PrefabInstance: - target: {fileID: 4838871000058222821, guid: 49deb83b881477047bfac0ee629a7ae9, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -59.99997 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 49deb83b881477047bfac0ee629a7ae9, type: 3} diff --git a/Assets/Scripts/Loading/StreamingAssetLoader.cs b/Assets/Scripts/Loading/StreamingAssetLoader.cs index 0f5d00a1a2f6012347fa190ff88664de463e3cba..e8ad2dfa932003f47d6c0f271bbe1c622e765680 100644 --- a/Assets/Scripts/Loading/StreamingAssetLoader.cs +++ b/Assets/Scripts/Loading/StreamingAssetLoader.cs @@ -142,6 +142,7 @@ public static void NetworkJSON_Save() myObject.camRotatingSensitivity = UIconfig.camRotatingSensitivity; myObject.MouseKeepingInWindow = UIconfig.MouseKeepingInWindow; myObject.scrolldirection = UIconfig.scrolldirection; + myObject.scrollViewVersion = UIconfig.scrollViewVersion; @@ -478,6 +479,10 @@ public static void NetworkJSON_Load_x(string path) { UIconfig.scrolldirection = myObjs.scrolldirection; } + if (! string.IsNullOrEmpty(myObjsOnlyStrings.scrollViewVersion)) + { + UIconfig.scrollViewVersion = myObjs.scrollViewVersion; + } } diff --git a/Assets/Scripts/UI/InGame/SwitchScrollUI.cs b/Assets/Scripts/UI/InGame/SwitchScrollUI.cs new file mode 100644 index 0000000000000000000000000000000000000000..b25756019eb3242364856f300111d63166f1f706 --- /dev/null +++ b/Assets/Scripts/UI/InGame/SwitchScrollUI.cs @@ -0,0 +1,27 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class SwitchScrollUI : MonoBehaviour +{ + public GameObject ScrollShowUI; + public GameObject ScrollWebView; + void OnEnable() + { + switch (UIconfig.scrollViewVersion) + { + case UIconfig.ScrollViewVersion.ScrollShow: + ScrollWebView.SetActive(false); + ScrollShowUI.SetActive(true); + break; + case UIconfig.ScrollViewVersion.ScrollWebView: + ScrollShowUI.SetActive(false); + ScrollWebView.SetActive(true); + break; + default: + ScrollShowUI.SetActive(false); + ScrollWebView.SetActive(true); + break; + } + } +} diff --git a/Assets/Scripts/UI/InGame/SwitchScrollUI.cs.meta b/Assets/Scripts/UI/InGame/SwitchScrollUI.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4adc3448cdf51e8610c52c7b028dc37f257f3f7c --- /dev/null +++ b/Assets/Scripts/UI/InGame/SwitchScrollUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 90c1c0815499367409841816e1485ec7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UI/InGame/WebViewController.cs b/Assets/Scripts/UI/InGame/WebViewController.cs index e006956323ed0e1a04e56b4efd35c9bf78926234..f312d971c0f99c41a7fbf930cde811b2c39a01a8 100644 --- a/Assets/Scripts/UI/InGame/WebViewController.cs +++ b/Assets/Scripts/UI/InGame/WebViewController.cs @@ -20,7 +20,7 @@ public class WebViewController : MonoBehaviour // TODO: implement onHintRequested event public UnityEvent<DomNodeWrapper, string> onHintRequested; // TODO: click events (option for custom buttons for a scroll) - public UnityEvent<DomNodeWrapper, string> onClick; + public UnityEvent<DomNodeWrapper> onClick; private WebViewComponent webViewComponent; private DomNodeWrapper[] dropzones; diff --git a/Assets/Scripts/UI/NetwMenu/StartMenu_mobile.cs b/Assets/Scripts/UI/NetwMenu/StartMenu_mobile.cs index c844693e5a414033e8be2d232be6935e7e9de6fe..878b339fe9595e2cfc9831582220be92d3020e3d 100644 --- a/Assets/Scripts/UI/NetwMenu/StartMenu_mobile.cs +++ b/Assets/Scripts/UI/NetwMenu/StartMenu_mobile.cs @@ -119,7 +119,7 @@ void start2_CheckOS_CheckConfig() NetworkJSON_Load(); if (!checkDataPath() && false) - Debug.Log("Todo: Pr�fen auf Bugs bzl DataPath"); + Debug.Log("Todo: Pr�fen auf Bugs bzl DataPath"); if (!checkDataPath() || true) { @@ -211,10 +211,12 @@ void changeSettingsToOS() case OperationSystem.Windows: UIconfig.controlMode = ControlMode.Keyboard; if (autoSettingsAdaption == 2) { UIconfig.FrameITUIversion = 1; } + UIconfig.scrollViewVersion = ScrollViewVersion.ScrollWebView; break; case OperationSystem.Android: UIconfig.controlMode = ControlMode.Mobile; if (autoSettingsAdaption == 2) { UIconfig.FrameITUIversion = 2; } + UIconfig.scrollViewVersion = ScrollViewVersion.ScrollShow; break; default: break; diff --git a/Assets/Scripts/UI/UIconfig.cs b/Assets/Scripts/UI/UIconfig.cs index 4250cb104355a82048fce2cb3426eb7b6b717595..a9fe37caa108cfe4f9566939e55be91bdab26ceb 100644 --- a/Assets/Scripts/UI/UIconfig.cs +++ b/Assets/Scripts/UI/UIconfig.cs @@ -6,6 +6,12 @@ public static class UIconfig { public static int FrameITUIversion = 2; // 1= FrameITUI; 2= FrameITUI_mobil + public static ScrollViewVersion scrollViewVersion = ScrollViewVersion.ScrollShow; + public enum ScrollViewVersion + { + ScrollShow = 1, + ScrollWebView = 2, + } public static int InputManagerVersion = 1; // 1= InputManager, 2=InputSystemPackage ; 3=overConfigfile public static int EventSystemModule = 2;// 1= InputManager, 2=InputSystemPackage ; 3=overConfigfile public static int GameplayMode = 5; //5=First Person, 4=third, 3=third+, 2=Escaperoom, 1=Sidescroller, 0=Sidescroller+ @@ -125,6 +131,7 @@ public class NetworkJSON public float camRotatingSensitivity; //Sensitivity to inputs. public bool MouseKeepingInWindow; public int scrolldirection; + public ScrollViewVersion scrollViewVersion; } public class NetworkJSONonlyString @@ -150,6 +157,7 @@ public class NetworkJSONonlyString public string camRotatingSensitivity; //Sensitivity to inputs. public string MouseKeepingInWindow; public string scrolldirection; + public string scrollViewVersion; } //------------------------------------------------------------------------------------------------------ diff --git a/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network.JSON b/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network.JSON index eb50d80634abf076304e51be7fcbd575c0dea88c..14c02347d1ddf2ecac930d239269c7f639c98a4c 100644 --- a/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network.JSON +++ b/Assets/StreamingAssets/StreamToPersistentDataPath/Config/Network.JSON @@ -19,5 +19,6 @@ "cursorSize": 0.03125, "camRotatingSensitivity": 2.0, "MouseKeepingInWindow": true, - "scrolldirection": -1 + "scrolldirection": -1, + "scrollViewVersion": 2 } \ No newline at end of file