/// <summary> /// Initializes a new MenuButton class. /// </summary> /// <param name="assignedUIManager">The AssignedUIManager.</param> public MenuButton(UIManager assignedUIManager) : base(assignedUIManager) { Size = new UISize(300, 30); _font = new Font("Segoe UI", 16, TypefaceStyle.Bold); Text = "MenuButton1"; }
/// <summary> /// Initializes a new UIControl class. /// </summary> /// <param name="assignedUIManager">The assigned UIManager.</param> protected UIControl(UIManager assignedUIManager) { _position = new Vector2(0, 0); _size = new UISize(0, 0); UpdateBounds(); _mouseRectangle = new Rectangle {Width = 1, Height = 1}; Guid = Guid.NewGuid(); _inputManager = SGL.Components.Get<InputManager>(); CanGetFocus = true; Enable = true; Visible = true; _parent = null; _lastRelativeMousePostion = new Vector2(0, 0); Children = new List<UIControl>(); UIManager = assignedUIManager; UIManager.Add(this); }
/// <summary> /// Initializes a new UIControl class. /// </summary> /// <param name="assignedUIManager">The assigned UIManager.</param> protected UIControl(UIManager assignedUIManager) { _position = new Vector2(0, 0); _size = new UISize(0, 0); UpdateBounds(); _mouseRectangle = new Rectangle { Width = 1, Height = 1 }; Guid = Guid.NewGuid(); _inputManager = SGL.Components.Get <InputManager>(); CanGetFocus = true; Enable = true; Visible = true; _parent = null; _lastRelativeMousePostion = new Vector2(0, 0); Children = new List <UIControl>(); UIManager = assignedUIManager; UIManager.Add(this); }