Skip to content

Commit d52f382

Browse files
authored
Fix donate menu focus with hover (#1810)
1 parent 1d9df19 commit d52f382

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/ui_parts/donate_menu.gd

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
extends PanelContainer
22

3-
# This overengineered menu mostly has logic around not hiding the text as you move your
4-
# mouse between the buttons. The text stays unless the mouse moves too far away from
5-
# the specific button that showed the current list of pros/cons.
3+
# This overengineered menu mostly has logic around not hiding the text as you
4+
# move your mouse between the buttons. The text stays unless the mouse moves too far away
5+
# from the specific button that showed the current list of pros/cons.
66

77
enum Link {NONE, GITHUB, KO_FI, PATREON}
88
var current_link := Link.NONE
@@ -77,6 +77,12 @@ func _on_link_focused(button: Button, link: Link) -> void:
7777
set_link(link)
7878

7979
func set_link(new_link: Link) -> void:
80+
if new_link == Link.NONE:
81+
for button in button_links:
82+
if button.has_focus(true):
83+
new_link = button_links[button]
84+
break
85+
8086
current_link = new_link
8187
if new_link == Link.NONE:
8288
clarifications.clear()

0 commit comments

Comments
 (0)