From 5dcb87c727e52a9576e3ff241a0103943f908507 Mon Sep 17 00:00:00 2001 From: Kamil Jarosz Date: Mon, 13 May 2024 01:03:04 +0200 Subject: [PATCH] debug_ui: Add stage focus rect --- core/src/debug_ui/display_object.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/debug_ui/display_object.rs b/core/src/debug_ui/display_object.rs index f059b78a6808..28e7ef8a9537 100644 --- a/core/src/debug_ui/display_object.rs +++ b/core/src/debug_ui/display_object.rs @@ -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()) {