Пример #1
0
        public override void _on_draw()
        {
            // 1.背景
            if (show_bg)
            {
                EView.DrawTexture(_world_pos, EStyle.GetColorTexture(bg_color));
            }

            if (show_box)
            {
                if (_box_style != null)
                {
                    GUI.Box(_world_pos, "", _box_style);
                }
                else
                {
                    GUI.Box(_world_pos, "");
                }
            }

            // TODO GUILayout.BeginArea(_position); //导致奔溃掉
            // 所以启用了另外一套方式
            int length = _childs.Count;

            for (int i = 0; i < length; i++)
            {
                _childs[i].OnDraw(_world_pos.x, _world_pos.y);
            }
        }
Пример #2
0
 public override void Draw()
 {
     if (_data != null)
     {
         select_index = EView.EnumPopup(_world_pos, _lab, select_index, _des);
     }
 }
Пример #3
0
 public override void Draw()
 {
     _result = EView.Button(_world_pos, _text, _guiStyle);
     if (_result && OnClick != null)
     {
         OnClick(this);
     }
 }
Пример #4
0
 public override void _on_draw()
 {
     if (_enable)
     {
         if (_show_bg)
         {
             EView.DrawTexture(_world_pos, EStyle.GetColorTexture(_bg_color));
         }
         Draw();
     }
 }
Пример #5
0
 public override void Draw()
 {
     if (CanEditor)
     {
         _value = EView.IntInput(_world_pos, _value);
     }
     else
     {
         EView.IntInput(_world_pos, _value);
     }
 }
Пример #6
0
 public override void Draw()
 {
     if (CanEditor)
     {
         text = EView.Input(_world_pos, text);
     }
     else
     {
         EView.Input(_world_pos, text);
     }
 }
Пример #7
0
        public override void Draw()
        {
            if (_data != null)
            {
                Enum tmp_data = _data;
                _data = EView.EnumPopup(_world_pos, _data);

                if (_data.CompareTo(tmp_data) != 0 && change_action != null)
                {
                    change_action(_data);
                }
            }
        }
Пример #8
0
 public override void Draw()
 {
     select = EView.Toggle(_world_pos, select, text);
     if (_last_select == select)
     {
     }
     else
     {
         _last_select = select;
         if (on_change != null)
         {
             on_change(this);
         }
     }
 }
Пример #9
0
        public override void Draw()
        {
            Object tmp_go = EView.ObjectFiled(_world_pos, _go);

            if (tmp_go != null && tmp_go is GameObject)
            {
                _go = tmp_go as GameObject;
            }

            if (tmp_go)
            {
                //if (GUI.Button(_world_pos, "Check Dependencies"))
                //    Selection.activeObject = tmp_go;
            }
            else
            {
                //EditorGUI.LabelField(_world_pos, "Missing:", "Select an object first");
            }
        }
Пример #10
0
        public override void _on_draw()
        {
            // 1.背景
            if (show_bg)
            {
                EView.DrawTexture(_world_pos, EStyle.GetColorTexture(bg_color));
            }

            if (show_box)
            {
                GUI.Box(_world_pos, "");
            }

            _view = new Rect(_world_pos.x, _world_pos.y, _world_pos.width, _view_height);

            scroll_position = EView.BeginScrollView(_world_pos, scroll_position, _view);
            int length = _childs.Count;

            for (int i = 0; i < length; i++)
            {
                _childs[i].OnDraw(_world_pos.x /*+ _pos.x - _size.x / 2*/, _world_pos.y /*+ _pos.y - _size.y / 2*/);
            }
            EView.EndScrollView();
        }
Пример #11
0
 public override void Draw()
 {
     EView.Label(_world_pos, text);
 }
Пример #12
0
 public override void Draw()
 {
     _selectIndex = EView.Toolbar(_world_pos, _selectIndex, _texts);
     _callback();
 }
Пример #13
0
 public override void Draw()
 {
     EView.Box(_world_pos, text);
 }
Пример #14
0
 public override void Draw()
 {
     _text = EView.TextArea(_world_pos, _text);
 }