Skip to content

Experiment: egui_tiles for tiled layout#259

Open
frewsxcv wants to merge 3 commits intomainfrom
feature/egui-tiles
Open

Experiment: egui_tiles for tiled layout#259
frewsxcv wants to merge 3 commits intomainfrom
feature/egui-tiles

Conversation

@frewsxcv
Copy link
Collaborator

@frewsxcv frewsxcv commented Mar 8, 2026

Summary

  • Add egui_tiles dependency and replace the fixed SidePanel + implicit CentralPanel with an egui_tiles-managed horizontal split
  • Two panes: Layers (left, ~20% width) and Map (right, ~80% width, transparent pass-through)
  • New MapPaneRect resource in rgis-units tracks the map pane's screen rect
  • Mouse systems check pointer position against MapPaneRect instead of egui's is_pointer_over_area() (which would always be true with a CentralPanel)
  • The split is user-resizable via egui_tiles' built-in drag handles
  • Panes are non-closable

What this enables

With egui_tiles, the layout can eventually support:

  • Drag-and-drop rearrangement of panels
  • Tabbed panel groups
  • Grid layouts
  • Additional panes (attribute table, properties, etc.) as first-class tiles

Test plan

  • Verify layers panel renders on the left
  • Verify map is visible and interactive (pan, zoom, query)
  • Verify the divider between layers and map is draggable to resize
  • Verify floating windows (add layer, manage, etc.) still position correctly

frewsxcv added 3 commits March 8, 2026 12:56
Replace the fixed SidePanel + implicit CentralPanel layout with an
egui_tiles-managed horizontal split (Layers | Map). The map pane is
transparent and passes input through to Bevy via a MapPaneRect
resource. Mouse systems now check pointer position against the map
pane rect instead of egui's is_pointer_over_area().
Use egui_tiles within a SidePanel instead of CentralPanel to avoid
breaking map interaction (is_pointer_over_area) and transparency.
Revert mouse/units changes that were needed for CentralPanel approach.
Make the map a tile pane alongside Layers in egui_tiles. Uses
CentralPanel with Frame::NONE so Bevy renders behind the transparent
Map pane. Adds MapPaneRect resource for mouse input handling since
is_pointer_over_area() always returns true with CentralPanel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant