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; }
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 static StyleDefinition GetVisualStyle(MyGuiControlListStyleEnum style) { return m_styles[(int)style]; }
public static StyleDefinition GetVisualStyle(MyGuiControlListStyleEnum style) { return(m_styles[(int)style]); }