예제 #1
0
 public GuiScrollbar(LayoutMode layout, GuiContainer container, int thickness)
     : base(thickness, thickness)
 {
     Layout    = layout;
     FlexX     = layout == LayoutMode.Horizontal;
     FlexY     = layout == LayoutMode.Vertical;
     Container = container;
     OnLayout += UpdateHandle;
 }
예제 #2
0
        internal void DoAdded(GuiContainer parent)
        {
            Parent = parent;
            OnAdded?.Invoke();

            if (parent is GuiView)
            {
                DoAddedToView((GuiView)parent);
            }
            else if (parent.View != null)
            {
                DoAddedToView(parent.View);
            }
        }