Skip to content

Commit

Permalink
debug_ui: Add stage focus rect
Browse files Browse the repository at this point in the history
  • Loading branch information
kjarosh committed May 12, 2024
1 parent 6411b70 commit 140f8de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/src/debug_ui/display_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,14 @@ impl DisplayObjectWindow {
Grid::new(ui.id().with("stage"))
.num_columns(2)
.show(ui, |ui| {
ui.label("Stage Focus Rect");
let mut new_stage_focus_rect = object.stage_focus_rect();
ui.checkbox(&mut new_stage_focus_rect, "Enabled");
if new_stage_focus_rect != object.stage_focus_rect() {
object.set_stage_focus_rect(context.gc(), new_stage_focus_rect);
}
ui.end_row();

ui.label("Current Focus");
ui.vertical(|ui| {
if let Some(focus) = focus.map(|o| o.as_displayobject()) {
Expand Down

0 comments on commit 140f8de

Please sign in to comment.