How to disable button highlighting?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By NeoTheThird
:warning: Old Version Published before Godot 3 was released.

I’m playing around with YeOldeDM/Minesweeper from the asset lib and I encountered a weird behavior with button highlighting in Godot, but i’m not yet sure it’s a bug, so i’d like to just disable that feature for now. When I start the game and click on the tile, it gets highlighted with a blue frame that can be moved around using the arrow keys. If I now move it to an unpressed tile and rightclick another unpressed tile to plant a flag in the game, both tiles get flagged. This does not happen with left clicks, but it’s still very annoying. I’m not sure if i should file a bug with Godot or Minesweeper, but for now I’d like to disable Button Highlighting. I checked the class reference, but did not find anything. Can you help me?

[Edit:] I also filed a bug: Right-clicking a button when another button is highlighted · Issue #8193 · godotengine/godot · GitHub

:bust_in_silhouette: Reply From: volzhs

Make new StyleBoxEmpty for Focus or Hover.

I’m sorry, could you elaborate on that?

NeoTheThird | 2017-03-29 15:32

added screenshot

volzhs | 2017-03-29 17:01

Ok, that worked. Thank you very much. I’ll write a pull-request for the game soon.

NeoTheThird | 2017-03-29 17:16

:bust_in_silhouette: Reply From: Aeris

You can disable this blue box by selecting the button node in Godot and then going to the Inspector->Control>Focus>Mode>None

Mode will disable button hovering (the blue box).

Thank you for the simple answer!

Covenauta | 2022-07-10 22:56