Add multipass option and checkbox
This commit is contained in:
parent
42110f8cd5
commit
e0a8e8f36a
2 changed files with 12 additions and 0 deletions
|
@ -100,6 +100,11 @@ pub struct Options {
|
||||||
/// but is a signal to any backend that we want the [`crate::Output::events`] read out loud.
|
/// but is a signal to any backend that we want the [`crate::Output::events`] read out loud.
|
||||||
/// Screen readers is an experimental feature of egui, and not supported on all platforms.
|
/// Screen readers is an experimental feature of egui, and not supported on all platforms.
|
||||||
pub screen_reader: bool,
|
pub screen_reader: bool,
|
||||||
|
|
||||||
|
/// Enable experimental two-pass layout.
|
||||||
|
///
|
||||||
|
/// See https://github.com/emilk/egui/issues/843
|
||||||
|
pub multi_pass: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
|
@ -132,6 +132,13 @@ impl BackendPanel {
|
||||||
ui.ctx().memory().options.screen_reader = screen_reader;
|
ui.ctx().memory().options.screen_reader = screen_reader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
let mut multi_pass = ui.ctx().memory().options.multi_pass;
|
||||||
|
ui.checkbox(&mut multi_pass, "☯ Multipass (experimental)")
|
||||||
|
.on_hover_text("Experimental two-pass layout");
|
||||||
|
ui.ctx().memory().options.multi_pass = multi_pass;
|
||||||
|
}
|
||||||
|
|
||||||
if !frame.is_web() {
|
if !frame.is_web() {
|
||||||
ui.separator();
|
ui.separator();
|
||||||
if ui.button("Quit").clicked() {
|
if ui.button("Quit").clicked() {
|
||||||
|
|
Loading…
Reference in a new issue