mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 23:13:13 -04:00
Add multipass option and checkbox
This commit is contained in:
@@ -100,6 +100,11 @@ pub struct Options {
|
||||
/// 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.
|
||||
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;
|
||||
}
|
||||
|
||||
{
|
||||
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() {
|
||||
ui.separator();
|
||||
if ui.button("Quit").clicked() {
|
||||
|
||||
Reference in New Issue
Block a user