Add scoped overlay hosts
This commit is contained in:
1 parent
a33fbca966
commit
44a5da378b
14 files changed
+882
-27
No files matched your search
+10
-3
@@ -109,9 +109,9 @@ impl AndroidUiState {
|
||||
}
|
||||
}
|
||||
|
||||
impl HasRoot for AndroidUiState {
|
||||
fn set_root(&mut self, root: StrongWidget) {
|
||||
self.root = Some(root);
|
||||
impl<State: 'static> HasRoot<AndroidRsc<State>> for AndroidUiState {
|
||||
fn set_root(&mut self, rsc: &mut AndroidRsc<State>, root: StrongWidget) {
|
||||
self.root = Some(crate::overlay::default_overlay_root(rsc, root));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,12 +463,19 @@ impl<State: AndroidAppState> ViewPeer for IrisViewPeer<State> {
|
||||
// `android/insets.rs`'s doc comment for why insets could not take
|
||||
// the same shortcut.
|
||||
if key_code == Keycode::Back {
|
||||
if self.rsc.run_command(Command::Escape) != CommandResult::Unused {
|
||||
self.after_input(ctx);
|
||||
return true;
|
||||
}
|
||||
let handled = self.state.back_pressed(&mut self.rsc, &mut self.render);
|
||||
if handled {
|
||||
self.after_input(ctx);
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
if self.rsc.events.controllers.command_target_blocks_input() {
|
||||
return true;
|
||||
}
|
||||
let handled = super::input::on_key(
|
||||
&mut self.rsc,
|
||||
&mut self.state,
|
||||
|
||||
Reference in new issue
Block a user