godotengine / godotengine/godot
OptionButtons do not display tooltips correctly when scrolled downwards
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in v4.2.1.stable.official [b09f793f5]
### System information
Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Mobile) - integrated Intel(R) Iris(R) Xe Graphics (Intel Corporation; 31.0.101.4953) - 12th Gen Intel(R) Core(TM) i5-1235U (12 Threads)
### Issue description
Option buttons that have very long lists of items will create a scrollbar on their own to display them all. However, the bounding boxes for item tooltips do not scroll correctly so hovering over an item will display the tooltip of the item several items above it when the bar is scrolled down. If the bar is not scrolled, tooltips display normally.
### Steps to reproduce
Create an option button as the root node.
Attach this script:
```
extends OptionButton
func _ready():
for i in range(100):
add_item("Option " + str(i))
set_item_tooltip(i, "Option " + str(i))
```
Run the project and try hovering over the options to see the names. Once you start scrolling, the will begin to be incorrect. Keep scrolling and they stop appearing.
### Minimal reproduction project (MRP)
[MRE.zip](https://github.com/godotengine/godot/files/15084223/MRE.zip)
Contributor guide
Assessment
This issue has not been assessed yet.