Add multipass option and checkbox

This commit is contained in:
Emil Ernerfeldt 2021-11-08 23:24:48 +01:00
parent 42110f8cd5
commit e0a8e8f36a
2 changed files with 12 additions and 0 deletions

View file

@ -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,
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View file

@ -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() {