Class ButtonSpriteMap
Definition
Namespace: StardewUI.Graphics
Assembly: StardewUI.dll
Base class for a ISpriteMap<T> for controller/keyboard bindings.
Inheritance
Object ⇦ ButtonSpriteMap
Implements
ISpriteMap
Members
Constructors
Name | Description |
---|---|
ButtonSpriteMap() |
Properties
Name | Description |
---|---|
ControllerBlank | A blank controller button upon which the specific button label can be drawn. |
KeyboardBlank | A blank keyboard key upon which the specific key name can be drawn. |
MouseLeft | The mouse with left button pressed. |
MouseMiddle | The mouse with middle button pressed. |
MouseRight | The mouse with right button pressed. |
Methods
Name | Description |
---|---|
Get(SButton, Boolean) | Gets the sprite corresponding to a particular key. |
Get(SButton) | Gets the specific sprite for a particular button. |
Details
Constructors
ButtonSpriteMap()
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, Boolean)
Gets the sprite corresponding to a particular key.
public StardewUI.Graphics.Sprite Get(StardewModdingAPI.SButton key, out System.Boolean isPlaceholder);
Parameters
key
SButton
The key to retrieve.
isPlaceholder
Boolean
true
if the returned Sprite is not specific to the key
, but is instead a placeholder (border/background) in which some substitute, typically normal text, must be drawn. false
if the Sprite is a complete self-contained representation of the key
.
Returns
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.