-
Notifications
You must be signed in to change notification settings - Fork 6
ButtonBase.cs
Charles Humphrey edited this page Nov 16, 2017
·
1 revision
This is the basic button UI control derived from ControlBase
This denotes what color the text on the button should be.
This is the text that will be displayed on the button.
This is the shadow offset for the text.
This is the color of the text shadows.
If an Icon asset is to be used, this offset can place it in the button, if left null, the icon will be placed in the center.
This is used to place the text in the button, if left null, text will be placed in the center of the button.
True if the button is selected.
Color of the button when the mouse is hovering over it.
Color of the button when it is being pressed.
ButtonBase(Game game, Rectangle sizeRect, string text, string fontAsset, string iconAsset = null, Rectangle? iconRect = null, string backgroundAsset = null)
This is the constructor.
As well as calling the base.Draw(gameTime) this then renders the Icons and text on the button.