You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MenuBar and MenuButton's switch_on_hover property is not working properly when the scale factor multiplier is other than 1. The position the cursor needs to be in order for a PopupMenu to appear seems to be the one where the scale factor multiplier 1. In other words, the hover position is not scaling with the scale factor multiplier and remains constant. This results in a weird behavior, as seen in the below video.
2023-12-16.22-45-07.mp4
(Scale multiplier is set to 1.5 in the video)
The bigger the distance from 1, the weirder the behavior gets. Note that this also occurs when the scale is less than 1.
Interestingly, this doesn't seem to happen to the Godot editor itself.
Steps to reproduce
Create a project with a MenuBar node with PopupMenu items, or multiple MenuButtons as siblings and enable "Switch on Hover". Go to the project settings, General tab, Display, Window and set the Scale to something other than 1. Run the project, click on a menu button and move your cursor around to switch on a sibling menu button on hover. You can see that the position is wrong.
Tested versions
Reproducible in 4.2.1
System information
Godot v4.2.1.stable - openSUSE Tumbleweed 20231210 - X11 - GLES3 (Compatibility) - NVIDIA GeForce GTX 1060 6GB (nvidia) - AMD Ryzen 5 1600 Six-Core Processor (12 Threads)
Issue description
MenuBar and MenuButton's
switch_on_hover
property is not working properly when the scale factor multiplier is other than 1. The position the cursor needs to be in order for a PopupMenu to appear seems to be the one where the scale factor multiplier 1. In other words, the hover position is not scaling with the scale factor multiplier and remains constant. This results in a weird behavior, as seen in the below video.2023-12-16.22-45-07.mp4
(Scale multiplier is set to 1.5 in the video)
The bigger the distance from 1, the weirder the behavior gets. Note that this also occurs when the scale is less than 1.
Interestingly, this doesn't seem to happen to the Godot editor itself.
Steps to reproduce
Create a project with a MenuBar node with PopupMenu items, or multiple MenuButtons as siblings and enable "Switch on Hover". Go to the project settings, General tab, Display, Window and set the Scale to something other than 1. Run the project, click on a menu button and move your cursor around to switch on a sibling menu button on hover. You can see that the position is wrong.
Minimal reproduction project (MRP)
MenuButtonHoverBug.zip
The text was updated successfully, but these errors were encountered: