1- /*
1+ /*
22 * @author Valentin Simonov / http://va.lent.in/
33 */
44
@@ -14,26 +14,24 @@ namespace TouchScript.Editor.Behaviors.Visualizer
1414 internal sealed class TouchVisualizerEditor : UnityEditor . Editor
1515 {
1616
17- public static readonly GUIContent TEXT_SETTINGS_HEADER = new GUIContent ( "Pointer settings" , "General pointersettings." ) ;
1817 public static readonly GUIContent TEXT_DPI_HEADER = new GUIContent ( "Use DPI" , "Scale touch pointer based on DPI." ) ;
1918 public static readonly GUIContent TEXT_ADVANCED_HEADER = new GUIContent ( "Advanced" , "Advanced settings." ) ;
20-
21- public static readonly GUIContent TEXT_POINTER_ID = new GUIContent ( "Show Pointer Id" , "Display pointer id." ) ;
22- public static readonly GUIContent TEXT_POINTER_FLAGS = new GUIContent ( "Show Pointer Flags" , "Display pointer flags." ) ;
2319 public static readonly GUIContent TEXT_POINTER_SIZE = new GUIContent ( "Pointer size (cm)" , "Pointer size in cm based on current DPI." ) ;
2420
25- private SerializedProperty touchProxy , useDPI , touchSize , showTouchId , showFlags ;
26- private SerializedProperty generalProps , advancedProps ;
21+ private SerializedProperty mousePointerProxy , touchPointerProxy , penPointerProxy , objectPointerProxy ;
22+ private SerializedProperty useDPI , touchSize ;
23+ private SerializedProperty advancedProps ;
2724
2825 private void OnEnable ( )
2926 {
30- showTouchId = serializedObject . FindProperty ( "showPointerId" ) ;
31- showFlags = serializedObject . FindProperty ( "showFlags" ) ;
32- touchProxy = serializedObject . FindProperty ( "pointerProxy" ) ;
27+ mousePointerProxy = serializedObject . FindProperty ( "mousePointerProxy" ) ;
28+ touchPointerProxy = serializedObject . FindProperty ( "touchPointerProxy" ) ;
29+ penPointerProxy = serializedObject . FindProperty ( "penPointerProxy" ) ;
30+ objectPointerProxy = serializedObject . FindProperty ( "objectPointerProxy" ) ;
31+
3332 useDPI = serializedObject . FindProperty ( "useDPI" ) ;
3433 touchSize = serializedObject . FindProperty ( "pointerSize" ) ;
3534
36- generalProps = serializedObject . FindProperty ( "generalProps" ) ;
3735 advancedProps = serializedObject . FindProperty ( "advancedProps" ) ;
3836 }
3937
@@ -43,16 +41,7 @@ public override void OnInspectorGUI()
4341
4442 GUILayout . Space ( 5 ) ;
4543
46- var display = GUIElements . Header ( TEXT_SETTINGS_HEADER , generalProps ) ;
47- if ( display )
48- {
49- EditorGUI . indentLevel ++ ;
50- EditorGUILayout . PropertyField ( showTouchId , TEXT_POINTER_ID ) ;
51- EditorGUILayout . PropertyField ( showFlags , TEXT_POINTER_FLAGS ) ;
52- EditorGUI . indentLevel -- ;
53- }
54-
55- display = GUIElements . Header ( TEXT_DPI_HEADER , useDPI , useDPI ) ;
44+ var display = GUIElements . Header ( TEXT_DPI_HEADER , useDPI , useDPI ) ;
5645 if ( display )
5746 {
5847 EditorGUI . indentLevel ++ ;
@@ -67,8 +56,11 @@ public override void OnInspectorGUI()
6756 if ( display )
6857 {
6958 EditorGUI . indentLevel ++ ;
70- EditorGUILayout . PropertyField ( touchProxy , new GUIContent ( "Pointer Proxy" ) ) ;
71- EditorGUI . indentLevel -- ;
59+ EditorGUILayout . PropertyField ( mousePointerProxy , new GUIContent ( "Mouse Pointer Proxy" ) ) ;
60+ EditorGUILayout . PropertyField ( touchPointerProxy , new GUIContent ( "Touch Pointer Proxy" ) ) ;
61+ EditorGUILayout . PropertyField ( penPointerProxy , new GUIContent ( "Pen Pointer Proxy" ) ) ;
62+ EditorGUILayout . PropertyField ( objectPointerProxy , new GUIContent ( "Object Pointer Proxy" ) ) ;
63+ EditorGUI . indentLevel -- ;
7264 }
7365
7466 serializedObject . ApplyModifiedProperties ( ) ;
0 commit comments