Struct nannou::ui::Builder[][src]

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

A type used for building a new Ui.

Methods

impl<'a> Builder<'a>
[src]

Specify the window on which the Ui will be instantiated.

By default, this is the currently focused window, aka the window returned via App::window_id.

Build the Ui with the given dimensions.

By default, the Ui will have the dimensions of the specified window.

Build the Ui with the given theme.

By default, nannou uses conrod's default theme.

Whether or not the App should automatically submit input to the Ui.

When enabled, events that can be interpreted as UI Input will be passed to the Ui via the conrod::Ui::handle_input method.

Note that Inputs are not immediately submitted to the Ui when received by the App. Instead, they are enqueued for the Ui to be processed next time Ui::set_widgets is called. The max number of pending Inputs before they become ignored can be specified via the pending_input_limit method.

By default this is true. Users should set this to false if they wish to manually filter and submit events (e.g. if something is occluding the Ui and the user wishes to filter occluded input).

Specify the max number of pending Inputs that can be enqueued for processing by the Ui before Inputs start being ignored.

By default this is Ui::DEFAULT_PENDING_INPUT_LIMIT.

This has no affect if automatically_handle_input is set to false.

Specify the path to the default font.

By default this is "fonts/NotoSans/NotoSans-Regular.ttf".

Fonts can also be specified manually after Ui creation using the fonts_mut method.

Specify the dimensions of the texture used to cache glyphs on the GPU.

By default this is equal to the framebuffer dimensions of the associated window at the time of building the UI.

If you notice any glitching of UI text, this may be due to exceeding the bounds of the texture used to cache glyphs. Try using this to specify a larger glyph cache size to fix this.

Build a Ui with the specified parameters.

Returns None if the window at the given Id is closed or if the inner Renderer returns an error upon creation.

Auto Trait Implementations

impl<'a> !Send for Builder<'a>

impl<'a> !Sync for Builder<'a>