godot
godot copied to clipboard
Show override icon in script editor gutter
Part of https://github.com/godotengine/godot-proposals/issues/5369
Includes two new icons for the script editor gutter, one for overridden method and a second for combining with the "connected signal" icon:
I also snuck another commit in to optimize an icon from a previous PR :eyes:
For completeness, #64693 implements the same as a highlighting color
Anyway, I'm looking forward to these being discernible! I think an icon along the lines of an arrow forking out would be more intuitive. Not a svg extraordinaire, so here's a pixel art version of what I have in mind:
Combo:
*Edited to reflect Yeldham's comment
The override color shouldn't be the same as the connection one, so they can clearly stand out from each other. The combo one can have the arrow keep the override color and the box the connection color.
Thanks for the icon templates @MewPurPur, I went ahead and created SVG versions based on these.
@Paulb23 Good point. I added the feature, so it jumps to the method declaration when clicking on the icon. For built-in classes, it jumps to the corresponding documentation page instead. Uses dictionaries like suggested.
For the "combined" signal+override case, I think it would be nice to somehow show both icon's information (e.g. open a PopupMenu which allows choosing whether to show the dialog or the declaration). But I think it's a rare enough case that we can ignore this for now. Until more gutter icons get added and a real system needs to be in place for them.
Thanks! And congrats for snatching PR 0xFFFF
!
Is there any way of hiding these new icons? It seems that I can hide the whole info gutter, but I would still like to have the signal icons visible.
@fracteed There currently is no way, but I don't see anything that speaks against adding some more fine-grained editor settings to choose which gutter icons should show.
@RedMser thanks for your reply. Yes, it would be great to have per icon toggles for the gutter in the same way that we have per item gizmo visibility in the viewport. Especially if more icons end up being added over time.
Ideally this would be a menu in the text editor itself rather than having to dive into preferences. I can certainly see their usefulness, but they are not something that I need to see all the time.