Skip to content
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

Slider line color #71

Open
q-depot opened this issue Jul 17, 2013 · 3 comments
Open

Slider line color #71

q-depot opened this issue Jul 17, 2013 · 3 comments

Comments

@q-depot
Copy link

q-depot commented Jul 17, 2013

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.

@Wizzard033
Copy link
Contributor

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.

@q-depot
Copy link
Author

q-depot commented Jul 18, 2013

can you give me a hint on where and how should I implement this?

@Wizzard033
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants