Class CustomButtonSpriteMap
Definition
Namespace: StardewUI.Graphics
Assembly: StardewUI.dll
Controller/keyboard/mouse sprite map using custom/configured asset data.
Inheritance
Object ⇦ ButtonSpriteMap ⇦ CustomButtonSpriteMap
Members
Constructors
Name | Description |
---|---|
CustomButtonSpriteMap(IGameContentHelper, ButtonSpriteMapData) | Controller/keyboard/mouse sprite map using custom/configured asset data. |
Properties
Name | Description |
---|---|
ControllerBlank | A blank controller button upon which the specific button label can be drawn. (Overrides ButtonSpriteMap. get_ControllerBlank() ) |
KeyboardBlank | A blank keyboard key upon which the specific key name can be drawn. (Overrides ButtonSpriteMap. get_KeyboardBlank() ) |
MouseLeft | The mouse with left button pressed. (Overrides ButtonSpriteMap. get_MouseLeft() ) |
MouseMiddle | The mouse with middle button pressed. (Overrides ButtonSpriteMap. get_MouseMiddle() ) |
MouseRight | The mouse with right button pressed. (Overrides ButtonSpriteMap. get_MouseRight() ) |
Methods
Name | Description |
---|---|
Get(SButton) | Gets the specific sprite for a particular button. (Overrides ButtonSpriteMap.Get(SButton)) |
Get(SButton, Boolean) | Gets the sprite corresponding to a particular key. (Inherited from ButtonSpriteMap) |
Details
Constructors
CustomButtonSpriteMap(IGameContentHelper, ButtonSpriteMapData)
Controller/keyboard/mouse sprite map using custom/configured asset data.
public CustomButtonSpriteMap(StardewModdingAPI.IGameContentHelper content, StardewUI.Data.ButtonSpriteMapData data);
Parameters
content
IGameContentHelper
Helper for retrieving main game assets.
data
ButtonSpriteMapData
Configuration data for this map.
Properties
ControllerBlank
A blank controller button upon which the specific button label can be drawn.
Property Value
Remarks
If the sprite specifies non-zero FixedEdges then they will be added to the label's margin.
KeyboardBlank
A blank keyboard key upon which the specific key name can be drawn.
Property Value
Remarks
If the sprite specifies non-zero FixedEdges then they will be added to the label's margin.
MouseLeft
The mouse with left button pressed.
Property Value
MouseMiddle
The mouse with middle button pressed.
Property Value
MouseRight
The mouse with right button pressed.
Property Value
Methods
Get(SButton)
Gets the specific sprite for a particular button.
Parameters
button
SButton
The button for which to retrieve a sprite.
Returns
The precise Sprite representing the given button
, or null
if the button does not have a special sprite and could/should use a generic background + text.