diff --git a/core/simulation_engine.py b/core/simulation_engine.py index b01f09a..dd60b43 100644 --- a/core/simulation_engine.py +++ b/core/simulation_engine.py @@ -216,6 +216,9 @@ class SimulationEngine: # Reset TPS display to current value if self.hud.custom_tps_entry: self.hud.custom_tps_entry.set_text(str(int(self.simulation_core.timing.state.tps))) + elif action == 'viewport_resized': + # Update simulation viewport when panels are resized + self._update_simulation_view() def _handle_sprint_mode(self): """Handle sprint mode by running multiple simulation ticks quickly.""" diff --git a/ui/hud.py b/ui/hud.py index d9d436f..fbd2f41 100644 --- a/ui/hud.py +++ b/ui/hud.py @@ -14,7 +14,7 @@ DARKER_GRAY = (25, 25, 25) # Panel visibility constants SHOW_CONTROL_BAR = True -SHOW_INSPECTOR_PANEL = False +SHOW_INSPECTOR_PANEL = True SHOW_PROPERTIES_PANEL = True SHOW_CONSOLE_PANEL = False @@ -348,7 +348,9 @@ class HUD: self.dragging_splitter = "console" self.update_layout(self.screen_width, self.screen_height) elif event.type == pygame.MOUSEBUTTONUP and event.button == 1: - self.dragging_splitter = None + if self.dragging_splitter is not None: + self.dragging_splitter = None + return 'viewport_resized' elif event.type == pygame.MOUSEMOTION and self.dragging_splitter: mx, my = event.pos if self.dragging_splitter == "inspector":