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

Create data driven skin #33

Open
billyquith opened this issue Aug 17, 2016 · 4 comments
Open

Create data driven skin #33

billyquith opened this issue Aug 17, 2016 · 4 comments

Comments

@billyquith
Copy link
Owner

billyquith commented Aug 17, 2016

Includes:

  • Texture UVs are currently hardcoded into the skin ('Init(...)). Move these to a file and read at runtime. This would allow an external tool to edit them.
  • Colours are read from skin texture. Move these to a file as need to edit the texture to change the colour.
  • Fonts could also be read from config file.
  • Config file might be like CSS. Perhaps JSON file with cascade overrides.

Since skinning is quite a lot of code and many values (e.g. colours) are hardcoded into GWEN code this would be best done in a branch, creating a new skin type, and comparing the results with the unchanged branch. For this it would be useful to have automated screen capture comparisons.

@Grant1219
Copy link
Contributor

Another feature that would be neat is actually per-element skin. For example right now if I want to have a red progress bar and a blue progress bar, it is not really possible since they are forced to use the same skin.

@billyquith
Copy link
Owner Author

Skins might also be rendered using an API like nanovg, doesn't have to be a 9 segment texture.

First of all a bit of tidying up is necessary as some things are hardcoded into the controls.

I'm not likely to get round to doing anything on this for while. It is open source, so if you'd like to contribute, perhaps start an issue, I can help with any clarification, and we can make some progress. A lot of the controls in this library have quite advanced functionality compared to other GUI libraries (tree control, multi-line edit, etc). It could be so much better with skinning separated.

@Grant1219
Copy link
Contributor

I will come back to this later if someone else has not because I will need more advanced skinning functionality. First I need to get the MVP (minimum viable product) of my game finished.

Having a separate API for skins seems like a good idea to me as well, and it might fit nicely between the existing rendering backends and the GUI elements.

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

No branches or pull requests

3 participants
@Grant1219 @billyquith and others