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
Instead of offering core nodes that automatically load a controller icon based on a path, it might be possible to, instead, offer a new Resource type, inheriting from Texture2D, that can handle all the current functionality. This is a pretty cool idea because:
Simplifies coding to a single implementation, instead of duplicated code that's currently on all 4 node types
Allows more advanced use-cases and the possibility for developers to integrate such icons on custom nodes
Does not require a script to be attached to the node for the icon to work
Does not incur on any scene changes, which can currently happen when developers switch from keyboard to controller
Due to raw drawing commands, it can easily support advanced use-cases, such as multi-icon drawing (e.g. XXY - Combo Attack), and embedded in other nodes such as RichTextLabel (e.g. Press F to pay respects)
Even with this system, there are some restrictions about usability that cannot change:
The system must still work with plain image files like it currently does. Users need to be able to switch icon assets without additional steps.
The current system to accept input actions, joypad paths, and icon paths must remain unchanged in behavior to the current system.
Plus, this will result in a new breaking change, and a very substantial one, requiring either automated or manual refactoring.
The text was updated successfully, but these errors were encountered:
Another caveat is that queuing a redraw (necessary if input method changes) is not as easy. So far the best solution is to use Resource's emit_changed, but some Godot nodes do not listen to this, notably RichTextLabel. This will be reported as a bug and hopefully be fixed.
Update: The bug was reported and there's already a fix, so this won't block implementation. Will need to keep a note for any users using an older version of Godot when the fix is deployed, but other than that, this approach looks good.
Instead of offering core nodes that automatically load a controller icon based on a path, it might be possible to, instead, offer a new Resource type, inheriting from
Texture2D
, that can handle all the current functionality. This is a pretty cool idea because:XXY - Combo Attack
), and embedded in other nodes such as RichTextLabel (e.g.Press F to pay respects
)Even with this system, there are some restrictions about usability that cannot change:
Plus, this will result in a new breaking change, and a very substantial one, requiring either automated or manual refactoring.
The text was updated successfully, but these errors were encountered: