Skip to content

Commit

Permalink
Remove visual inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Shallowmallow committed Feb 7, 2024
1 parent 50b80f0 commit 7505220
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions haxe/ui/containers/menus/Menu.hx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@ class MenuEvents extends haxe.ui.events.Events {
}
}

if (parentMenu != null) {
// so that's is always the parent menu that is visually selected
// even if you have previously hovered over parent's siblings.
var menuItem:MenuItem = null;
for (mi => menu in cast(parentMenu._compositeBuilder, Builder)._subMenus) {
if (_menu == menu) menuItem = mi;
}
parentMenu.currentItem = menuItem;
}

if (_timer != null) {
_timer.stop();
_timer = null;
Expand Down

0 comments on commit 7505220

Please sign in to comment.