i would like to ask if there is a preferred way of replacing the base material that is being used for the gui elements?
Additionally i would like to add some styling properties on the already existing elements that are then forwarded to the material?
I would prefer to not fork lemur and make the changes there.
I believe the first part is relatively easy. 99% sure that everything calls GuiGlobals createMaterial(). So when initializing GUI globals, you could instead pass a subclass that creates your own material.
The second part is harder because there are no setters/getters for your new properties and no StyleAttribute annotations.
âŚbut now I wonder what exactly you are trying to do because maybe there is an easier way.
None of the GUI elements actually draw anything and thus rely on component stacks⌠and if styling the ânew materialsâ is what you are really after then you may only have to mess with some component subclasses. Iâd need to know the situation to better advise.
My Material allows to set BackgroundColor, BackgroundHighlight, BorderColor and BorderHighlightColor as well as some modifiers.
The shader mixes the final color depending on the channels of the background image.
The most optimal solution would be that i can can set my color values in the same way inside the groovy stylesheet like i do with the default components.
When you style a GUI element, you can specify the background, border, etc. layers.
So if you are using QuadBackground component for these then one option is to extend QuadBackgroundComponent or whatever to have your material options and then just set the right background component in styling⌠or the right properties on your cloned background component.
To me, it doesnât seem to be so different betwee:
I have missed the QuadBackgroundComponent/TbtQuadBackgroundComponent. I was browsing trough the TbtQuad, GuiControl, and the actual Components and have missed the âglue it togetherâ stuff. Yeah. i think with extending TbtQuadBackgroundComponent i am able to achieve what i try to do