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); } }
public override void _on_draw() { if (_enable) { if (_show_bg) { EView.DrawTexture(_world_pos, EStyle.GetColorTexture(_bg_color)); } Draw(); } }
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(); }