watch: highlight current set
This commit is contained in:
@@ -64,6 +64,10 @@ impl RenderResources {
|
||||
}
|
||||
}
|
||||
|
||||
pub enum OverlayEventData {
|
||||
SetChanged(Option<usize>),
|
||||
}
|
||||
|
||||
pub trait OverlayBackend: Any {
|
||||
/// Called once, before the first frame is rendered
|
||||
fn init(&mut self, app: &mut AppState) -> anyhow::Result<()>;
|
||||
@@ -82,6 +86,8 @@ pub trait OverlayBackend: Any {
|
||||
/// Must be Some if should_render was Should or Can on the same frame.
|
||||
fn frame_meta(&mut self) -> Option<FrameMeta>;
|
||||
|
||||
fn notify(&mut self, app: &mut AppState, event_data: OverlayEventData) -> anyhow::Result<()>;
|
||||
|
||||
fn on_hover(&mut self, app: &mut AppState, hit: &PointerHit) -> HoverResult;
|
||||
fn on_left(&mut self, app: &mut AppState, pointer: usize);
|
||||
fn on_pointer(&mut self, app: &mut AppState, hit: &PointerHit, pressed: bool);
|
||||
@@ -125,6 +131,10 @@ impl OverlayBackend for DummyBackend {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
fn notify(&mut self, _: &mut AppState, _event_data: OverlayEventData) -> anyhow::Result<()> {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
fn on_hover(&mut self, _: &mut AppState, _: &PointerHit) -> HoverResult {
|
||||
HoverResult::default()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user