How to create a GUI?

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

How to create a GUI?

Post by kattle87 »

I would like to create a GUI using, say, something like the image of a red cross for healt. How can i do it using not text but sprites or anything like that?
They should remain in the same position while camera is moving...

Plus, maybe i've found a little bug, i'll post it if i can reproduce it.
Bye bye!
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi kattle87,

As rendering Sprites in Screen space is currently not possible, there are 2 good alternatives. One is to set and orient GUI elements to the camera yourself so that they appear to stay in the same place ( FOV ), the other is to use the Font and RenderText Components using a bitmap that holds your GUI elements instead of the alphabet 8) The latter is probably the easiest.

Good luck ~
K
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

yep! i had already thought at the 2 solutions you proposed...
I think i'm gonna use the font solution.
I've started a project, and i will need help with graphics, musics, levels :P take a look at it!
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Kjell wrote:the other is to use the Font and RenderText Components using a bitmap that holds your GUI elements instead of the alphabet 8)
Good tip Kjell! A benefit of this method is that several items can be rendered using the same texture which is good for performance.
Post Reply