/// <summary> /// Creates the GUI of the tap settings. /// </summary> private static void CreateTapSettingsGUI() { GUILayout.BeginVertical("HelpBox"); GUILayout.Label("Tap Settings", EditorStyles.boldLabel); // Min tap duration GUILayout.BeginVertical("GroupBox"); EditorGUILayout.LabelField("Min Tap Duration In Seconds", EditorStyles.largeLabel); inputSettings.minTapDuration = GUIFactory.CreateFloatFieldGUI(inputSettings.minTapDuration, 0.0f, (float)double.PositiveInfinity); GUILayout.EndVertical(); // Max tap duration GUILayout.BeginVertical("GroupBox"); EditorGUILayout.LabelField("Max Tap Duration In Seconds", EditorStyles.largeLabel); inputSettings.maxTapDuration = GUIFactory.CreateFloatFieldGUI(inputSettings.maxTapDuration, 0.0f, (float)double.PositiveInfinity); GUILayout.EndVertical(); GUILayout.EndVertical(); }
/// <summary> /// Creates the GUI of the tilt settings. /// </summary> private static void CreateTiltSettingsGUI() { GUILayout.BeginVertical("HelpBox"); GUILayout.Label("Tilt Settings", EditorStyles.boldLabel); // Pos x-tilt treshold GUILayout.BeginVertical("GroupBox"); EditorGUILayout.LabelField("Min Positive Needed X-Tilt (right) Treshold", EditorStyles.largeLabel); inputSettings.xTiltPosThreshold = GUIFactory.CreateFloatFieldGUI(inputSettings.xTiltPosThreshold, -1.0f, 1.0f); GUILayout.EndVertical(); // Neg x-tilt treshold GUILayout.BeginVertical("GroupBox"); EditorGUILayout.LabelField("Min Negative Needed X-Tilt (left) Treshold", EditorStyles.largeLabel); inputSettings.xTiltNegThreshold = GUIFactory.CreateFloatFieldGUI(inputSettings.xTiltNegThreshold, -1.0f, 1.0f); GUILayout.EndVertical(); // Pos y-tilt treshold GUILayout.BeginVertical("GroupBox"); EditorGUILayout.LabelField("Min Positive Needed Y-Tilt (forward) Treshold", EditorStyles.largeLabel); inputSettings.yTiltPosThreshold = GUIFactory.CreateFloatFieldGUI(inputSettings.yTiltPosThreshold, -1.0f, 1.0f); GUILayout.EndVertical(); // Neg y-tilt treshold GUILayout.BeginVertical("GroupBox"); EditorGUILayout.LabelField("Min Negative Needed Y-Tilt (backward) Treshold", EditorStyles.largeLabel); inputSettings.yTiltNegThreshold = GUIFactory.CreateFloatFieldGUI(inputSettings.yTiltNegThreshold, -1.0f, 1.0f); GUILayout.EndVertical(); GUILayout.EndVertical(); }
/// <summary> /// Creates GUI elements for tap settings data. /// </summary> private void CreateTapDataGUI() { EditorGUILayout.BeginVertical("HelpBox"); EditorGUILayout.LabelField("Tap Settings", EditorStyles.boldLabel); EditorGUILayout.LabelField("Min Tap Duration In Seconds", EditorStyles.largeLabel); minTapDuration.floatValue = GUIFactory.CreateFloatFieldGUI(minTapDuration.floatValue, 0.0f, (float)double.PositiveInfinity); GUIFactory.AddGUISpace(1); EditorGUILayout.LabelField("Max Tap Duration In Seconds", EditorStyles.largeLabel); maxTapDuration.floatValue = GUIFactory.CreateFloatFieldGUI(maxTapDuration.floatValue, 0.0f, (float)double.PositiveInfinity); EditorGUILayout.EndVertical(); }
/// <summary> /// Creates GUI elements for swipe settings data. /// </summary> private void CreateSwipeDataGUI() { EditorGUILayout.BeginVertical("HelpBox"); EditorGUILayout.LabelField("Swipe Settings", EditorStyles.boldLabel); EditorGUILayout.LabelField("Min Horizontal Swipe Length (in % of screen)", EditorStyles.largeLabel); minHorizontalSwipeLength.floatValue = GUIFactory.CreateFloatFieldGUI(minHorizontalSwipeLength.floatValue, 0.0f, 100.0f); GUIFactory.AddGUISpace(1); EditorGUILayout.LabelField("Min Vertical Swipe Length (in % of screen)", EditorStyles.largeLabel); minVerticalSwipeLength.floatValue = GUIFactory.CreateFloatFieldGUI(minVerticalSwipeLength.floatValue, 0.0f, 100.0f); EditorGUILayout.EndVertical(); }
/// <summary> /// Creates GUI elements for tilt settings data. /// </summary> private void CreateTiltDataGUI() { EditorGUILayout.BeginVertical("HelpBox"); EditorGUILayout.LabelField("Tilt Settings", EditorStyles.boldLabel); EditorGUILayout.LabelField("Min Positive Needed X-Tilt (right)", EditorStyles.largeLabel); xTiltPosThreshold.floatValue = GUIFactory.CreateFloatFieldGUI(xTiltPosThreshold.floatValue, 0.0f, 1.0f); GUIFactory.AddGUISpace(1); EditorGUILayout.LabelField("Min Negative Needed X-Tilt (left)", EditorStyles.largeLabel); xTiltNegThreshold.floatValue = GUIFactory.CreateFloatFieldGUI(xTiltNegThreshold.floatValue, -1.0f, 0.0f); GUIFactory.AddGUISpace(1); EditorGUILayout.LabelField("Min Positive Needed Y-Tilt (forward)", EditorStyles.largeLabel); yTiltPosThreshold.floatValue = GUIFactory.CreateFloatFieldGUI(yTiltPosThreshold.floatValue, 0.0f, 1.0f); GUIFactory.AddGUISpace(1); EditorGUILayout.LabelField("Min Negative Needed Y-Tilt (backward)", EditorStyles.largeLabel); yTiltNegThreshold.floatValue = GUIFactory.CreateFloatFieldGUI(yTiltNegThreshold.floatValue, -1.0f, 0.0f); EditorGUILayout.EndVertical(); }