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]
fn with_dimensions(self, dimensions: [Scalar; 2]) -> Self
[src]
Build the Ui
with the given dimensions.
By default, the Ui
will have the dimensions of the specified window.
fn with_theme(self, theme: Theme) -> Self
[src]
Build the Ui
with the given theme.
By default, nannou uses conrod's default theme.
fn automatically_handle_input(self, b: bool) -> Self
[src]
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 Input
s 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 Input
s 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).
fn pending_input_limit(self, limit: usize) -> Self
[src]
Specify the max number of pending Input
s that can be enqueued for processing by the Ui
before Input
s start being ignored.
By default this is Ui::DEFAULT_PENDING_INPUT_LIMIT
.
This has no affect if automatically_handle_input
is set to false
.
fn default_font_path(self, path: PathBuf) -> Self
[src]
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.
fn build(self) -> Option<Ui>
[src]
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.