Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    423124

Untitled

Sign in to follow this  
Evil Steve

62 views

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...
Sign in to follow this  


3 Comments


Recommended Comments

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 :).

Share this comment


Link to comment
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...

Share this comment


Link to comment
Guest Anonymous Poster

Posted

Could you explain your TinyXML wrapper briefly for me? I wrote one a while back and am in the process of taking it apart and rewriting one.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!