private void optionsFunc(int id) { GUILayout.Box("Speed"); speed = GUILayout.HorizontalSlider(speed, 0.0f, 1.0f); GUILayout.Label(""); PrototypeWearableVer.enableSerial = GUILayout.Toggle(PrototypeWearableVer.enableSerial, " Enable Prototype"); PrototypeWearableVer.invertAxis = GUILayout.Toggle(PrototypeWearableVer.invertAxis, " Invert Prototype Coordinates"); GUILayout.Label(""); //GUILayout.Box("Prototype Gimball Serial Port"); //PrototypeWearableVer.serialPort = GUILayout.SelectionGrid(PrototypeWearableVer.serialPort, optionsPort, 4, GUI.skin.toggle); //GUILayout.Label(""); GUILayout.Box("Prototype Tracking Mode"); PrototypeWearableVer.trackingMode = GUILayout.SelectionGrid(PrototypeWearableVer.trackingMode, optionsTracking, optionsTracking.Length, GUI.skin.toggle); GUILayout.Label(""); if (GUILayout.Button("Reset Prototype position")) { PrototypeWearableVer.resetPosition(); } if (GUILayout.Button("Back")) { clicked = ""; } }
private void OnGUI() { GUI.skin = guiSkin; GUI.Box(new Rect(0, 10, Screen.width, 25), PrototypeWearableVer.messageStatus); GUI.Label(new Rect(10, 40, 500, 20), "FPS: " + PrototypeWearableVer.leapFPS); GUI.Label(new Rect(10, 55, 500, 20), "Pitch - DELTA - Latitude : " + PrototypeWearableVer.getPitch()); GUI.Label(new Rect(10, 70, 500, 20), "Yaw - THETA - Longitude : " + PrototypeWearableVer.getYaw()); GUI.Label(new Rect(10, 85, 500, 20), "Palm Speed : " + PrototypeWearableVer.getSpeed()); GUI.Label(new Rect(10, 100, 500, 20), "Tracking Mode : " + PrototypeWearableVer.trackingMode); if (clicked == "" && menuOpen) { WindowRect = GUI.Window(0, WindowRect, menuFunc, "Prototype Menu"); } else if (clicked == "options" && menuOpen) { WindowRect = GUI.Window(1, WindowRect, optionsFunc, "Options"); } }