GWEN
GWEN copied to clipboard
Slider line color
Is it possible to override or set in the png template the slider line color?
I noticed it's hard-coded, but I was wondering if this can be changed in a way that makes sense for everybody.
There is a LOT of things in GWEN that should be using the skin and aren't.
I for one would appreciate if you would fork GWEN and fix these inconsistencies in a nice way. (I don't think Garry will be trying to fix issues with GWEN any time soon, but he does take pull requests)
Edit: Hell, even just fixing the one you want is better than none of them being fixed.
can you give me a hint on where and how should I implement this?
Notice the following color being set from the skin in Text.cpp :
GWEN_CONTROL_CONSTRUCTOR( Text )
{
m_Font = NULL;
m_ColorOverride = Color( 255, 255, 255, 0 );
m_Color = GetSkin()->Colors.Label.Default;
SetMouseInputEnabled( false );
SetWrap( false );
}
There is a structure in Skin.h, Colors. Add a color value to this structure in a similar format to the ones already there. Now go to TexturedBase::Init in TexturedBase.h to initialize the color in a similar format to the others. These three changes above in their respective location should have you good to go for the TexturedBase skin.
Note that the Simple skin may also need changes so things do not start looking weird. It would be nice if you made sure your changes worked with both the Simple and TexturedBase skins.