🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Untitled

posted in DruinkJournal
Published July 28, 2006
Advertisement
I finished my TinyXML wrapper class, and it works pretty nicely. Particularly since I only need to support tag names, attributes and text. And it works perfectly with UTF-8. I can now load and render Chinese and Russian if I feel the need.

My GUI factory is comming along, I've restructured it a bit, so it recursively creates GUI elements, and attaches them to their parent. So for instance, I can attach a text widget to a button widget, which causes the text to be offset by the button position, and drawn appropriately.
Buttons are created by giving them a position, image and texture coordinates to use (Size is determined by the texture coords), or by using a button definition and a position. So far all I have is "standard", but the point is that I can get a set of buttons all looking the same without having to trawl through the XML files to change them all.
A nice side effect of using sprites as the button images, is they're automatically handled by the texture manager, and chucked onto texture sheets.

I'm also probably going to make everything use localised text, by using token names instead of literal strings. That way, if I feel the need, I can convert to other languages nice and easily. But that's something I can fairly easily add later on.

I'm working through my lunch today, so I can get away at 5 because my parents are away and I'm having people round for a piss-up. So I'll hopefully get home at 6:30ish (Depending on when the busses are exactly, and if the train is on time).

So, back to work again...
Previous Entry Untitled
Next Entry Untitled
0 likes 3 comments

Comments

sirob
Since you're using ID3DXSprite, how are you handling different display resolutions, if at all? All I could come up with is using SetTransform to scale it up, but that doesn't seem like the best solution.

Anyhow, sounds nice :).
July 28, 2006 10:10 AM
Evil Steve
Quote: Original post by sirob
Since you're using ID3DXSprite, how are you handling different display resolutions, if at all? All I could come up with is using SetTransform to scale it up, but that doesn't seem like the best solution.

Anyhow, sounds nice :).
I'm using an orthogonal projection matrix, fixing at 1024x768. Any lower and everything gets scaled down, and any higher and it all gets scaled up. Not pretty, but it works...
July 28, 2006 10:23 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement