Skip to content

How to color categories #107

Closed Answered by bitbrain
pietru2004 asked this question in Q&A
Sep 4, 2023 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

so you could just do this using self modulate on icon right?

Oh wow, good shout! I discovered there is https://docs.godotengine.org/en/stable/classes/class_treeitem.html#class-treeitem-method-set-icon-modulate

This can be implemented very easily:

  1. add new color attribute and make it configurable to the entity configuration (point 5 on https://bitbra.in/pandora/#/concepts/editor)
  2. make color inherit from parent by default unless overridden
  3. change logic in entity_tree.gd to set the modulate item color based on the color of the entity https://github.com/bitbrain/pandora/blob/godot-4.x/addons/pandora/ui/components/entity_tree/entity_tree.gd#L130
  4. setup a signal to when the color attribute cha…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@pietru2004
Comment options

@pietru2004
Comment options

@bitbrain
Comment options

Answer selected by bitbrain
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants