Ejemplo n.º 1
0
        public override void OnGUI()
        {
            base.OnGUI();
            GUI.contentColor          = Color.green;
            GUI.skin.label.alignment  = TextAnchor.MiddleLeft;
            GUI.skin.box.alignment    = TextAnchor.MiddleLeft;
            GUI.skin.button.alignment = TextAnchor.MiddleLeft;

            if (viewObj != null)
            {
                GUI.Box(new Rect(0, 0, 700, Screen.height), "");
                GUI.Box(new Rect(0, 0, 700, Screen.height), "");
            }

            if (viewObj == null && GUILayout.Button("Collect"))
            {
                viewObj = new ViewObj(GameModuleFeature.Instance);
            }
            else if (viewObj != null && GUILayout.Button("Close"))
            {
                viewObj = null;
            }

            if (viewObj != null)
            {
                scroll = GUILayout.BeginScrollView(scroll);
                viewObj.DrawGUI();
                GUILayout.EndScrollView();
            }

            scroll += Input.mouseScrollDelta.y * Vector2.up * 0.1f;
        }
Ejemplo n.º 2
0
 public ViewObj(int arrayIndex, ViewObj parent)
 {
     this.arrayIndex = arrayIndex;
     this.parent     = parent;
     Reset();
 }
Ejemplo n.º 3
0
 public ViewObj(PropertyInfo info, ViewObj parent)
 {
     this.propertyInfo = info;
     this.parent       = parent;
     Reset();
 }
Ejemplo n.º 4
0
 public ViewObj(FieldInfo info, ViewObj parent)
 {
     this.fieldInfo = info;
     this.parent    = parent;
     Reset();
 }