Struct amethyst_ui::UiButtonBuilder[][src]

pub struct UiButtonBuilder { /* fields omitted */ }

Convenience structure for building a button

Methods

impl UiButtonBuilder
[src]

Construct a new UiButtonBuilder. This allows easy use of default values for text and button appearance and allows the user to easily set other UI-related options.

Add a parent to the button.

Add an anchor to the button.

Stretch the button.

This will set the rendered characters within the button. Use this to just change what characters will appear. If you need to change the font size, color, etc., then you should use with_uitext and provide a new UiText object.

Replace the default UiImage with image.

Use a different font for the button text.

Provide an X and Y position for the button.

This will create a default UiTransform if one is not already attached. See DEFAULT_Z, DEFAULT_WIDTH, DEFAULT_HEIGHT, and DEFAULT_TAB_ORDER for the values that will be provided to the default UiTransform.

Provide a Z position, i.e UI layer

Set button size

Set button tab order

Set font size

Set text color

Text color to use when the mouse is hovering over this button

Set text color when the button is pressed

Button image to use when the mouse is hovering over this button

Button image to use when this button is pressed

Sound emitted when this button is hovered over

Sound emitted when this button is pressed

Sound emitted when this button is released

Build this with the UiButtonBuilderResources.

Create the UiButton based on provided configuration parameters.

Trait Implementations

impl Default for UiButtonBuilder
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations