// ShowParameters private void ShowParameters() { GUILayout.BeginVertical("Box"); GUILayout.Label("Parameters", StyleHelper.LabelStyle()); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Button Name", GUILayout.Width(115)); myTarget.MyName = EditorGUILayout.TextField(myTarget.MyName); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label(" Normal"); GUILayout.Label(" Pressed"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); myTarget.normalSprite = EditorGUILayout.ObjectField(myTarget.normalSprite, typeof(Sprite), false) as Sprite; myTarget.pressedSprite = EditorGUILayout.ObjectField(myTarget.pressedSprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.EndVertical(); GUILayout.Space(5); EventsHelper.ShowEvents(115); }
// ShowParameters private void ShowParameters() { const int size = 115; GUILayout.BeginVertical("Box"); GUILayout.Label("Parameters", StyleHelper.LabelStyle()); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Sensitivity", GUILayout.Width(size)); myTarget.sensitivity = EditorGUILayout.Slider(myTarget.sensitivity, 1f, 10f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Show TouchZone", GUILayout.Width(size)); myTarget.ShowTouchZone = EditorGUILayout.Toggle(myTarget.ShowTouchZone); GUILayout.EndHorizontal(); if (myTarget.ShowTouchZone) { GUILayout.BeginHorizontal(); GUILayout.Space(15); GUILayout.Label("TouchZone Sprite", GUILayout.Width(size)); myTarget.myData.touchzoneImage.sprite = EditorGUILayout.ObjectField(myTarget.myData.touchzoneImage.sprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); } GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("DPad Name", GUILayout.Width(size)); myTarget.MyName = EditorGUILayout.TextField(myTarget.MyName); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label(" Arrow Normal"); GUILayout.Label(" Arrow Pressed"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); myTarget.normalSprite = EditorGUILayout.ObjectField(myTarget.normalSprite, typeof(Sprite), false) as Sprite; myTarget.pressedSprite = EditorGUILayout.ObjectField(myTarget.pressedSprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.EndVertical(); GUILayout.Space(5); AxesHelper.ShowAxes(size); GUILayout.Space(5); EventsHelper.ShowEvents(size); }
// ShowParameters private void ShowParameters() { const int size = 115; GUILayout.BeginVertical("Box"); GUILayout.Label("Parameters", StyleHelper.LabelStyle()); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Sensitivity", GUILayout.Width(size)); myTarget.sensitivity = EditorGUILayout.Slider(myTarget.sensitivity, 1f, 10f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Max Steering Angle", GUILayout.Width(size)); myTarget.maxSteeringAngle = EditorGUILayout.Slider(myTarget.maxSteeringAngle, 36f, 360f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Released Speed", GUILayout.Width(size)); myTarget.releasedSpeed = EditorGUILayout.Slider(myTarget.releasedSpeed, 25f, 150f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Wheel Name", GUILayout.Width(size)); myTarget.MyName = EditorGUILayout.TextField(myTarget.MyName); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Steering Wheel", GUILayout.Width(size)); myTarget.myData.touchzoneImage.sprite = EditorGUILayout.ObjectField(myTarget.myData.touchzoneImage.sprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.EndVertical(); GUILayout.Space(5); AxesHelper.ShowAxes(size, true); GUILayout.Space(5); EventsHelper.ShowEvents(size); }
// ShowParameters private void ShowParameters() { const int size = 115; GUILayout.BeginVertical("Box"); GUILayout.Label("Parameters", StyleHelper.LabelStyle()); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Mode", GUILayout.Width(size)); myTarget.IsStatic = System.Convert.ToBoolean(GUILayout.Toolbar(System.Convert.ToInt32(myTarget.IsStatic), modNames, GUILayout.Height(20))); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Sensitivity", GUILayout.Width(size)); myTarget.sensitivity = EditorGUILayout.Slider(myTarget.sensitivity, 1f, 10f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Border Size", GUILayout.Width(size)); myTarget.borderSize = EditorGUILayout.Slider(myTarget.borderSize, 1f, 9f); GUILayout.EndHorizontal(); GUILayout.Space(5); if (myTarget.IsStatic) { GUILayout.BeginHorizontal(); GUILayout.Label("Smooth Return", GUILayout.Width(size)); myTarget.smoothReturn = EditorGUILayout.Toggle(myTarget.smoothReturn); GUILayout.EndHorizontal(); if (myTarget.smoothReturn) { GUILayout.BeginHorizontal(); GUILayout.Space(15); GUILayout.Label("Smooth Factor", GUILayout.Width(size)); myTarget.smoothFactor = EditorGUILayout.Slider(myTarget.smoothFactor, 1f, 20f); GUILayout.EndHorizontal(); } } GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Show TouchZone", GUILayout.Width(size)); myTarget.ShowTouchZone = EditorGUILayout.Toggle(myTarget.ShowTouchZone); GUILayout.EndHorizontal(); if (myTarget.ShowTouchZone) { GUILayout.BeginHorizontal(); GUILayout.Space(15); GUILayout.Label("TouchZone Sprite", GUILayout.Width(size)); myTarget.myData.touchzoneImage.sprite = EditorGUILayout.ObjectField(myTarget.myData.touchzoneImage.sprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); } GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Joystick Name", GUILayout.Width(size)); myTarget.MyName = EditorGUILayout.TextField(myTarget.MyName); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label(" Joystick"); GUILayout.Label(" Background"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); myTarget.joystickImage.sprite = EditorGUILayout.ObjectField(myTarget.joystickImage.sprite, typeof(Sprite), false) as Sprite; myTarget.joystickBackgroundImage.sprite = EditorGUILayout.ObjectField(myTarget.joystickBackgroundImage.sprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.EndVertical(); GUILayout.Space(5); AxesHelper.ShowAxes(size); GUILayout.Space(5); EventsHelper.ShowEvents(size); }
// ShowParameters private void ShowParameters() { const int size = 115; GUILayout.BeginVertical("Box"); GUILayout.Label("Parameters", StyleHelper.LabelStyle()); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Anchor", GUILayout.Width(size)); myTarget.myData.Anchor = ( ControllerAnchor )EditorGUILayout.EnumPopup(myTarget.myData.Anchor); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Mode", GUILayout.Width(size)); myTarget.IsStatic = System.Convert.ToBoolean(GUILayout.Toolbar(System.Convert.ToInt32(myTarget.IsStatic), modNames, GUILayout.Height(20))); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Sensitivity", GUILayout.Width(size)); myTarget.sensitivity = EditorGUILayout.Slider(myTarget.sensitivity, 1f, 10f); GUILayout.EndHorizontal(); GUILayout.Space(5); float minOffsetX = 0f; float minOffsetY = 0f; if (myTarget.myData.Anchor == ControllerAnchor.LowerCenter || myTarget.myData.Anchor == ControllerAnchor.UpperCenter) { minOffsetX = -50f; } else if (myTarget.myData.Anchor == ControllerAnchor.MiddleCenter) { minOffsetX = -50f; minOffsetY = -50f; } GUILayout.BeginHorizontal(); GUILayout.Label("Offset X", GUILayout.Width(size)); myTarget.myData.OffsetX = EditorGUILayout.Slider(myTarget.myData.OffsetX, minOffsetX, 50f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Offset Y", GUILayout.Width(size)); myTarget.myData.OffsetY = EditorGUILayout.Slider(myTarget.myData.OffsetY, minOffsetY, 50f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Border Size", GUILayout.Width(size)); myTarget.borderSize = EditorGUILayout.Slider(myTarget.borderSize, 1f, 9f); GUILayout.EndHorizontal(); GUILayout.Space(5); if (myTarget.IsStatic) { GUILayout.BeginHorizontal(); GUILayout.Label("Smooth Return", GUILayout.Width(size)); myTarget.smoothReturn = EditorGUILayout.Toggle(myTarget.smoothReturn); GUILayout.EndHorizontal(); if (myTarget.smoothReturn) { GUILayout.BeginHorizontal(); GUILayout.Space(15); GUILayout.Label("Smooth Factor", GUILayout.Width(size)); myTarget.smoothFactor = EditorGUILayout.Slider(myTarget.smoothFactor, 1f, 20f); GUILayout.EndHorizontal(); } } GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Show TouchZone", GUILayout.Width(size)); myTarget.ShowTouchZone = EditorGUILayout.Toggle(myTarget.ShowTouchZone); GUILayout.EndHorizontal(); if (myTarget.ShowTouchZone) { GUILayout.BeginHorizontal(); GUILayout.Space(15); GUILayout.Label("TouchZone Sprite", GUILayout.Width(size)); myTarget.myData.touchzoneSprite.sprite = EditorGUILayout.ObjectField(myTarget.myData.touchzoneSprite.sprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); } GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Joystick Name", GUILayout.Width(size)); myTarget.MyName = EditorGUILayout.TextField(myTarget.MyName); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label(" Joystick"); GUILayout.Label(" Background"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); myTarget.joystickSprite.sprite = EditorGUILayout.ObjectField(myTarget.joystickSprite.sprite, typeof(Sprite), false) as Sprite; myTarget.joystickBackgroundSprite.sprite = EditorGUILayout.ObjectField(myTarget.joystickBackgroundSprite.sprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.EndVertical(); GUILayout.Space(5); AxesHelper.ShowAxes(size); GUILayout.Space(5); EventsHelper.ShowEvents(size); }
// ShowParameters private void ShowParameters() { GUILayout.BeginVertical("Box"); GUILayout.Label("Parameters", StyleHelper.LabelStyle()); GUILayout.Space(5); const int size = 115; GUILayout.BeginHorizontal(); GUILayout.Label("Anchor", GUILayout.Width(size)); myTarget.myData.Anchor = ( ControllerAnchor )EditorGUILayout.EnumPopup(myTarget.myData.Anchor); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Sensitivity", GUILayout.Width(size)); myTarget.sensitivity = EditorGUILayout.Slider(myTarget.sensitivity, 1f, 10f); GUILayout.EndHorizontal(); GUILayout.Space(5); float minOffsetX = 0f; float minOffsetY = 0f; if (myTarget.myData.Anchor == ControllerAnchor.LowerCenter || myTarget.myData.Anchor == ControllerAnchor.UpperCenter) { minOffsetX = -35f; } else if (myTarget.myData.Anchor == ControllerAnchor.MiddleCenter) { minOffsetX = -35f; minOffsetY = -35f; } GUILayout.BeginHorizontal(); GUILayout.Label("Offset X", GUILayout.Width(size)); myTarget.myData.OffsetX = EditorGUILayout.Slider(myTarget.myData.OffsetX, minOffsetX, 35f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Offset Y", GUILayout.Width(size)); myTarget.myData.OffsetY = EditorGUILayout.Slider(myTarget.myData.OffsetY, minOffsetY, 35f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Show TouchZone", GUILayout.Width(size)); myTarget.ShowTouchZone = EditorGUILayout.Toggle(myTarget.ShowTouchZone); GUILayout.EndHorizontal(); if (myTarget.ShowTouchZone) { GUILayout.BeginHorizontal(); GUILayout.Space(15); GUILayout.Label("TouchZone Width", GUILayout.Width(size)); myTarget.myData.ImageWidth = EditorGUILayout.Slider(myTarget.myData.ImageWidth, 5f, 50f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Space(15); GUILayout.Label("TouchZone Height", GUILayout.Width(size)); myTarget.myData.ImageHeight = EditorGUILayout.Slider(myTarget.myData.ImageHeight, 5f, 50f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Space(15); GUILayout.Label("TouchZone Texture", GUILayout.Width(size)); myTarget.myData.touchzoneGUITexture.texture = EditorGUILayout.ObjectField(myTarget.myData.touchzoneGUITexture.texture, typeof(Texture2D), false) as Texture2D; GUILayout.EndHorizontal(); } GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("DPad Name", GUILayout.Width(size)); myTarget.MyName = EditorGUILayout.TextField(myTarget.MyName); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.EndVertical(); // GUILayout.Space(5); AxesHelper.ShowAxes(size); GUILayout.Space(5); EventsHelper.ShowEvents(size); // }
// ShowParameters private void ShowParameters() { const int size = 115; GUILayout.BeginVertical("Box"); GUILayout.Label("Parameters", StyleHelper.LabelStyle()); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Anchor", GUILayout.Width(size)); myTarget.myData.Anchor = ( ControllerAnchor )EditorGUILayout.EnumPopup(myTarget.myData.Anchor); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Sensitivity", GUILayout.Width(size)); myTarget.sensitivity = EditorGUILayout.Slider(myTarget.sensitivity, 1f, 10f); GUILayout.EndHorizontal(); GUILayout.Space(5); float minOffsetX = 0f; float minOffsetY = 0f; if (myTarget.myData.Anchor == ControllerAnchor.LowerCenter || myTarget.myData.Anchor == ControllerAnchor.UpperCenter) { minOffsetX = -50f; } else if (myTarget.myData.Anchor == ControllerAnchor.MiddleCenter) { minOffsetX = -50f; minOffsetY = -50f; } GUILayout.BeginHorizontal(); GUILayout.Label("Offset X", GUILayout.Width(size)); myTarget.myData.OffsetX = EditorGUILayout.Slider(myTarget.myData.OffsetX, minOffsetX, 50f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Offset Y", GUILayout.Width(size)); myTarget.myData.OffsetY = EditorGUILayout.Slider(myTarget.myData.OffsetY, minOffsetY, 50f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Max Steering Angle", GUILayout.Width(size)); myTarget.maxSteeringAngle = EditorGUILayout.Slider(myTarget.maxSteeringAngle, 36f, 720f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Released Speed", GUILayout.Width(size)); myTarget.releasedSpeed = EditorGUILayout.Slider(myTarget.releasedSpeed, 25f, 150f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Wheel Name", GUILayout.Width(size)); myTarget.MyName = EditorGUILayout.TextField(myTarget.MyName); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Steering Wheel", GUILayout.Width(size)); myTarget.myData.touchzoneSprite.sprite = EditorGUILayout.ObjectField(myTarget.myData.touchzoneSprite.sprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.EndVertical(); GUILayout.Space(5); AxesHelper.ShowAxes(size, true); GUILayout.Space(5); EventsHelper.ShowEvents(size); }
// ShowParameters private void ShowParameters() { const int size = 115; GUILayout.BeginVertical("Box"); GUILayout.Label("Parameters", StyleHelper.LabelStyle()); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Anchor", GUILayout.Width(size)); myTarget.myData.Anchor = ( ControllerAnchor )EditorGUILayout.EnumPopup(myTarget.myData.Anchor); GUILayout.EndHorizontal(); GUILayout.Space(5); float minOffsetX = 0f; float minOffsetY = 0f; if (myTarget.myData.Anchor == ControllerAnchor.LowerCenter || myTarget.myData.Anchor == ControllerAnchor.UpperCenter) { minOffsetX = -50f; } else if (myTarget.myData.Anchor == ControllerAnchor.MiddleCenter) { minOffsetX = -50f; minOffsetY = -50f; } GUILayout.BeginHorizontal(); GUILayout.Label("Offset X", GUILayout.Width(size)); myTarget.myData.OffsetX = EditorGUILayout.Slider(myTarget.myData.OffsetX, minOffsetX, 50f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Offset Y", GUILayout.Width(size)); myTarget.myData.OffsetY = EditorGUILayout.Slider(myTarget.myData.OffsetY, minOffsetY, 50f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Button Name", GUILayout.Width(115)); myTarget.MyName = EditorGUILayout.TextField(myTarget.MyName); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label(" Normal"); GUILayout.Label(" Pressed"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); myTarget.normalSprite = EditorGUILayout.ObjectField(myTarget.normalSprite, typeof(Sprite), false) as Sprite; myTarget.pressedSprite = EditorGUILayout.ObjectField(myTarget.pressedSprite, typeof(Sprite), false) as Sprite; GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.EndVertical(); GUILayout.Space(5); EventsHelper.ShowEvents(115); }
// ShowParameters private void ShowParameters() { const int size = 115; GUILayout.BeginVertical("Box"); GUILayout.Label("Parameters", StyleHelper.LabelStyle()); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Anchor", GUILayout.Width(size)); myTarget.myData.Anchor = ( ControllerAnchor )EditorGUILayout.EnumPopup(myTarget.myData.Anchor); GUILayout.EndHorizontal(); GUILayout.Space(5); float minOffsetX = 0f; float minOffsetY = 0f; if (myTarget.myData.Anchor == ControllerAnchor.LowerCenter || myTarget.myData.Anchor == ControllerAnchor.UpperCenter) { minOffsetX = -35f; } else if (myTarget.myData.Anchor == ControllerAnchor.MiddleCenter) { minOffsetX = -35f; minOffsetY = -35f; } GUILayout.BeginHorizontal(); GUILayout.Label("Offset X", GUILayout.Width(size)); myTarget.myData.OffsetX = EditorGUILayout.Slider(myTarget.myData.OffsetX, minOffsetX, 35f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Offset Y", GUILayout.Width(size)); myTarget.myData.OffsetY = EditorGUILayout.Slider(myTarget.myData.OffsetY, minOffsetY, 35f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Button Width", GUILayout.Width(size)); myTarget.myData.ImageWidth = EditorGUILayout.Slider(myTarget.myData.ImageWidth, 1f, 25f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.Label("Button Height", GUILayout.Width(size)); myTarget.myData.ImageHeight = EditorGUILayout.Slider(myTarget.myData.ImageHeight, 1f, 25f); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.Label("Button Name", GUILayout.Width(size)); myTarget.MyName = EditorGUILayout.TextField(myTarget.MyName); GUILayout.EndHorizontal(); GUILayout.Space(5); GUILayout.EndVertical(); GUILayout.Space(5); EventsHelper.ShowEvents(size); GUILayout.Space(5); GUILayout.BeginVertical("Box"); GUILayout.Label("Textures", StyleHelper.LabelStyle()); GUILayout.Space(5); const int txsize = 140; GUILayout.BeginHorizontal(); GUILayout.Label(" Normal", GUILayout.Width(txsize)); GUILayout.Label(" Pressed", GUILayout.Width(txsize)); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); myTarget.normalTexture = EditorGUILayout.ObjectField(myTarget.normalTexture, typeof(Texture2D), false, GUILayout.Width(txsize), GUILayout.Height(txsize)) as Texture2D; myTarget.pressedTexture = EditorGUILayout.ObjectField(myTarget.pressedTexture, typeof(Texture2D), false, GUILayout.Width(txsize), GUILayout.Height(txsize)) as Texture2D; GUILayout.EndHorizontal(); GUILayout.EndVertical(); }