• Godot HelpGUI
  • Looking for a workaround for TextureButton not having a hover_pressed texture

I've been learning Godot's UI systems lately and was trying to create a custom main menu with irregularly shaped TextureButtons. Here's what I'm working on:

I wanted some toggleable buttons for sound and music on the menu, but I realized Texture Button doesn't not have a built in texture of when a button in toggle mode is pressed AND hovered over. It just defaults back to the normal texture. This seems odd, as other buttons have settings for this state. I did a little digging and found this Github page from 2018 discussing this issue. It appears to have been resolved, but the current version of Godot doesn't have that feature. Am I missing something, or do I have build a workaround to get this functionality? Please let me know if you have any suggestions.

Edit:
Here's a gif showing the missing functionality.

  • Megalomaniak replied to this.
  • You should be able to extend TextureButton and add additional functionality. Or you can use another type of object, like TextureRect, and code all the mouse interaction yourself.

    aNew I did a little digging and found this Github page from 2018 discussing this issue. It appears to have been resolved, but the current version of Godot doesn't have that feature.

    It's specifically referring to CheckBox and CheckButton not TextureButton.

    • aNew replied to this.

      You should be able to extend TextureButton and add additional functionality. Or you can use another type of object, like TextureRect, and code all the mouse interaction yourself.

      • aNew replied to this.