mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 20:35:02 +01:00
more
This commit is contained in:
parent
53556a38c0
commit
77a0e91746
1 changed files with 34 additions and 1 deletions
35
src/main.rs
35
src/main.rs
|
|
@ -1,4 +1,3 @@
|
||||||
use egui::PlatformOutput;
|
|
||||||
use egui_inspect::Inspect;
|
use egui_inspect::Inspect;
|
||||||
|
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
@ -58,6 +57,40 @@ impl std::fmt::Debug for TileDb {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct PlatformOutput {
|
||||||
|
/// Set the cursor to this icon.
|
||||||
|
pub cursor_icon: (),
|
||||||
|
|
||||||
|
/// If set, open this url.
|
||||||
|
pub open_url: Option<()>,
|
||||||
|
|
||||||
|
/// If set, put this text in the system clipboard. Ignore if empty.
|
||||||
|
///
|
||||||
|
/// This is often a response to [`crate::Event::Copy`] or [`crate::Event::Cut`].
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// # egui::__run_test_ui(|ui| {
|
||||||
|
/// if ui.button("📋").clicked() {
|
||||||
|
/// ui.output_mut(|o| o.copied_text = "some_text".to_string());
|
||||||
|
/// }
|
||||||
|
/// # });
|
||||||
|
/// ```
|
||||||
|
pub copied_text: String,
|
||||||
|
|
||||||
|
/// Events that may be useful to e.g. a screen reader.
|
||||||
|
pub events: Vec<()>,
|
||||||
|
|
||||||
|
/// Is there a mutable [`TextEdit`](crate::TextEdit) under the cursor?
|
||||||
|
/// Use by `eframe` web to show/hide mobile keyboard and IME agent.
|
||||||
|
pub mutable_text_under_cursor: bool,
|
||||||
|
|
||||||
|
/// Screen-space position of text edit cursor (used for IME).
|
||||||
|
pub text_cursor_pos: Option<()>,
|
||||||
|
|
||||||
|
#[cfg(feature = "accesskit")]
|
||||||
|
pub accesskit_update: Option<accesskit::TreeUpdate>,
|
||||||
|
}
|
||||||
|
|
||||||
pub fn output_mut<R>(writer: impl FnOnce(&mut PlatformOutput) -> R) -> R {
|
pub fn output_mut<R>(writer: impl FnOnce(&mut PlatformOutput) -> R) -> R {
|
||||||
loop {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue