GWEN Skins / Pixel Reading

Sunday, August 28, 2011

I did something cool with GWEN over the last couple of weeks. I made it so that the included renderers (OpenGL, DirectX, SFML, GDI) can read pixel values from the textures. (If you're interested in the source for this, explore here).

What does this mean? Well in GWEN the skin is mostly defined using a texture. This texture:

To make this:

This is all good except you'd usually need a counterpart customised skin class to define the colours of text and lines. Well not anymore. You see those squares on the bottom right? Each one of those defines a colour for something like the button text, button hover text, button down text, label, bright label, dull label, etc etc.

Why an 8x8 square instead of a 1x1 pixel? Well - no reason at all really - it just makes it a bit easier to see. There's an editable photoshop file on subversion if you want to try your hand at making a skin. Here's the sample from the source as of right now:

So if you're coding a game in c++ and are looking for a nice GUI solution, then be sure to give GWEN a look over.

These skins are synergised with the next version of GMod :)

More Rubbish

Your Portfolio Gave Me Diarrhea

Friday, October 1, 2021


Friday, September 24, 2021

We got married

Thursday, September 16, 2021

Unity Quiz

Sunday, September 6, 2020

Everything We Watched In Lockdown

Thursday, September 3, 2020

WIT: Deus Ex (3 I think)

Sunday, August 28, 2011


Saturday, August 27, 2011


Friday, August 26, 2011


Wednesday, August 24, 2011

Steam Chat

Tuesday, August 23, 2011