-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow specifying icons for tabs in TabContainer #592
Comments
This is possible via script, using the set_tab_icon() function. |
Well, TabContainer could allow to dynamically customize tabs, like GraphNode does it with sockets. |
It's not in the inspector, you can do it in code: https://docs.godotengine.org/en/latest/classes/class_tabcontainer.html#class-tabcontainer-method-set-tab-icon As for point 2 (you could edit the post to make it more visible btw), there's a PR that implements bottom tabs: godotengine/godot#31909 |
Thank you :) |
I don't know how far along this request is, but one good reason for having this as a 'custom constant' (or similar) is more than likely the texture will be a different size to the text. The net result is when you run the game your offsets for gui controls are probably shifted down and it looks a mess. But you cannot see what it looks like in design mode, so adjusting is difficult. To be honest there are a load of properties that should be part of the editor, for example set_tab_title seems pretty basic requirement. Maybe the problem is how TabContainer and Tabs are coupled and share common properties for some reason... |
@chucklepie I may be wrong, but I don't think the TabContainer and Tabs are supposed to be used together? By all means, I also think it would be good if Godot's tabs had a text/icon property built-in. It's currently really strange how the text of the tab is the node's name. |
Indeed, TabContainer and Tabs are not to be used together, they are replacements for each other. But they do share a lot of APIs and that's a huge bother to keep in sync. So our current plan is to make TabContainer use Tabs internally for the actual tabbar, and only add the "convert children to tabs" logic on top of it. This proposal will be solved in |
Ok, this doesn't really make sense to me, but if it's being fixed then fine, maybe the problem is almost complete lack of documentation (i.e. in the non-reference section, and very terse to the point of not being there in the reference section). But when you see the word 'TabContainer' you presume it means container for tabs, which is how I coded it as 'Tabs' didn't give me obvious means of creating multiple tabs and even says it doesn't control children which makes you wonder why it's called 'tabs' in the first place ;-) |
Tabs were renamed to TabBar, so there is no more confusion. And the aforementioned PR was merged. But the proposal isn't resolved yet. TabContainer can't use property array, because the list of properties depend on its children. As I said, this is closer to GraphNode's slots. Although we could maybe adapt the property array to support constant property lists. |
plus support, having it editable in the inspector makes it more accessible and better UX overall |
Describe the project you are working on:
gui interface for client server game
Describe the problem or limitation you are having in your project:
Currently we have the possibility to set a text to identify a tab in TabContainer
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
I guess it is a editor job?
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I'm not sure about it.
Is there a reason why this should be core and not an add-on in the asset library?:
It will be nice if will be a standard feature.
The text was updated successfully, but these errors were encountered: