Struct amethyst_ui::UiButtonBuilder[][src]

pub struct UiButtonBuilder<'a> { /* fields omitted */ }

Builder for a UiButton.

Methods

impl<'a> UiButtonBuilder<'a>
[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 an anchor to the button.

Add a parent to the button.

Stretch the button.

Add a UiTransform to the image to offset it within the UI.

This will completely replace the UiText object representing the button's text. Use this if you want to change more than just the characters, but the font size, color, etc. as well. Use with_text to just change the underlying text.

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.

Create the UiButton based on provided configuration parameters.

Auto Trait Implementations

impl<'a> Send for UiButtonBuilder<'a>

impl<'a> Sync for UiButtonBuilder<'a>