Commit 267bfa4
committed
Context menu plugin + viewport cursor polish
New renzora_context_menu plugin: right-click-tap on the viewport
opens a searchable menu. Two modes, picked by selection state:
- Nothing selected: Add menu sourced from SpawnRegistry (selected
preset spawns at the ground-plane hit and is selected).
- Something selected: Entity actions (Focus, Duplicate, Deselect,
Delete) that dispatch existing EditorActions via KeyBindings, so
user rebinds and existing consumers apply unchanged.
Right-click is shared with camera orbit — the menu only opens on a
tap (press + release with minimal motion). Motion is read from
MouseMotion events so cursor lock during orbit doesn't freeze
detection. Each open uses a fresh Area id so egui doesn't cache
layout from the previous render (was making the Add menu inherit
the smaller Entity menu height). Scroll area fills frame width.
Dispatch channel fix: KeyBindings::just_pressed / is_plugin_dispatched
now consume entries on read, and the Last-schedule sweep was removed.
The sweep was wiping dispatches made from EguiPrimaryContextPass (menu
clicks, command palette) before any Update-schedule consumer ran.
Viewport cursor UX:
- Crosshair cursor whenever the pointer is inside the viewport rect
(new ViewportOverlayRegistry drawer).
- Modal transforms hide the OS cursor for all three modes (G / R / S);
previously Scale kept it visible.
- Modal transforms also hide the immediate-mode axis / plane lines
drawn by draw_line_gizmos — they were sitting under the modal HUD.
- Brush tools (TerrainSculpt / TerrainPaint / FoliagePaint) hide the
cursor while hovering the viewport; new system tracks ownership so
it doesn't fight modal_transform's cursor visibility flips.
Default binding change: ToggleWireframe moved from Z to Alt+Z,
ToggleLighting from Shift+Z to Alt+Shift+Z. Bare Z was firing the
wireframe toggle during transform-tool editing.1 parent 43b6740 commit 267bfa4
8 files changed
Lines changed: 652 additions & 14 deletions
File tree
- crates
- core/renzora_core/src
- editor
- renzora_gizmo/src
- renzora_keybindings/src
- renzora_viewport/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
337 | 339 | | |
338 | 340 | | |
339 | 341 | | |
| |||
373 | 375 | | |
374 | 376 | | |
375 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
376 | 385 | | |
377 | | - | |
378 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
379 | 390 | | |
380 | 391 | | |
381 | 392 | | |
| |||
410 | 421 | | |
411 | 422 | | |
412 | 423 | | |
413 | | - | |
| 424 | + | |
| 425 | + | |
414 | 426 | | |
415 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
416 | 431 | | |
417 | 432 | | |
418 | 433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments