Пример #1
0
        public override void Init(MyObjectBuilder_GuiControlBase builder)
        {
            base.Init(builder);

            var ob = builder as MyObjectBuilder_GuiControlList;

            MyDebug.AssertDebug(ob != null);
            VisualStyle = ob.VisualStyle;
        }
        public MyGuiControlList(
            Vector2? position                     = null,
            Vector2? size                         = null,
            Vector4? backgroundColor              = null,
            String toolTip                        = null,
            MyGuiControlListStyleEnum visualStyle = MyGuiControlListStyleEnum.Default)
            : base( position: position,
                    size: size,
                    backgroundColor:  backgroundColor,
                    toolTip: toolTip)
        {
            Name = "ControlList";

            m_realSize = size ?? Vector2.One;
            m_scrollBar = new MyVScrollbar(this);
            m_scrollBar.ValueChanged += ValueChanged;

            VisualStyle = visualStyle;
            RecalculateScrollbar();

            Controls.CollectionChanged += OnVisibleControlsChanged;
            Controls.CollectionMembersVisibleChanged += OnVisibleControlsChanged;
        }
Пример #3
0
        public MyGuiControlList(
            Vector2?position        = null,
            Vector2?size            = null,
            Vector4?backgroundColor = null,
            String toolTip          = null,
            MyGuiControlListStyleEnum visualStyle = MyGuiControlListStyleEnum.Default)
            : base(position : position,
                   size : size,
                   backgroundColor :  backgroundColor,
                   toolTip : toolTip)
        {
            Name = "ControlList";

            m_realSize  = size ?? Vector2.One;
            m_scrollBar = new MyVScrollbar(this);
            m_scrollBar.ValueChanged += ValueChanged;

            VisualStyle = visualStyle;
            RecalculateScrollbar();

            Controls.CollectionChanged += OnVisibleControlsChanged;
            Controls.CollectionMembersVisibleChanged += OnVisibleControlsChanged;
        }
        public override void Init(MyObjectBuilder_GuiControlBase builder)
        {
            base.Init(builder);

            var ob = builder as MyObjectBuilder_GuiControlList;
            MyDebug.AssertDebug(ob != null);
            VisualStyle = ob.VisualStyle;
        }
 public static StyleDefinition GetVisualStyle(MyGuiControlListStyleEnum style)
 {
     return m_styles[(int)style];
 }
Пример #6
0
 public static StyleDefinition GetVisualStyle(MyGuiControlListStyleEnum style)
 {
     return(m_styles[(int)style]);
 }