Navigation: review r3 fix

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 13:15:17 -04:00
1 parent 529aea6fa4
commit 7e4d862c12
4 files changed
+48 -1

No files matched your search

+7 -1
View File
@@ -20,6 +20,9 @@ func (m *menubarRun) overlay(titles []ui.Rect) {
m.close()
return
}
if back.Pressed() {
m.focus(st.open)
}
// Title hotspots above the backdrop switch menus as the pointer moves.
for i, r := range titles {
hot := ui.Box(c).Absolute().Left(r.X).Top(r.Y).Size(r.W, r.H).Cursor(ui.CursorPointer)
@@ -31,6 +34,9 @@ func (m *menubarRun) overlay(titles []ui.Rect) {
}
return
}
if hot.Pressed() {
m.focus(st.open)
}
if hot.Hovered() && i != st.open {
m.openMenu(i, false)
}
@@ -76,7 +82,7 @@ func (m *menubarRun) panel(l int, x, y float32, parent ui.Rect) (*ui.Element, *u
y = max(4, wh-4-pb.H)
}
panel.Left(max(4, x)).Top(y)
if panel.Clicked() {
if panel.Clicked() || panel.Pressed() {
m.focus(st.open)
}
var anchor *ui.Element