Skip to content

Class CustomButtonSpriteMap

Definition

Namespace: StardewUI.Graphics
Assembly: StardewUI.dll

Controller/keyboard/mouse sprite map using custom/configured asset data.

public class CustomButtonSpriteMap : StardewUI.Graphics.ButtonSpriteMap

Inheritance
ObjectButtonSpriteMap ⇦ 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.

protected StardewUI.Graphics.Sprite ControllerBlank { get; }
Property Value

Sprite

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.

protected StardewUI.Graphics.Sprite KeyboardBlank { get; }
Property Value

Sprite

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.

protected StardewUI.Graphics.Sprite MouseLeft { get; }
Property Value

Sprite


MouseMiddle

The mouse with middle button pressed.

protected StardewUI.Graphics.Sprite MouseMiddle { get; }
Property Value

Sprite


MouseRight

The mouse with right button pressed.

protected StardewUI.Graphics.Sprite MouseRight { get; }
Property Value

Sprite


Methods

Get(SButton)

Gets the specific sprite for a particular button.

protected override StardewUI.Graphics.Sprite Get(StardewModdingAPI.SButton button);
Parameters

button   SButton
The button for which to retrieve a sprite.

Returns

Sprite

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.