Game Development Community

GUI buttons

by Freeman182 · in General Discussion · 01/23/2008 (7:48 am) · 4 replies

Im doing a games design course at Huddersfield Uni and iv got to crate the GUI for the project we are making.

im having trouble with the buttons, iv got 4 .png files called start_h, start_d, start_i & start_n

when i try and load the .png onto the guibitmapbutton nothing happens

can anyone tell me what im doing wrong?

#1
01/23/2008 (8:45 am)
The first thing you're doing wrong is not explaining your problem clearly.

The other, and most important thing, is that you aren't showing us your code or explaining what you're doing. You explained what you are trying to do, but not how you are going about it. Cut & paste your code for your GUI, or if you're actually using the GUI tool, try to explain the steps you are taking and the results you are getting.
#2
01/23/2008 (9:08 am)
A common mistake when using GuiBitmapButtonCtrl is including the file extension or the state part of the file names for the art files.

In the editor, you would enter something into the bitmap field like:

my_mod_name/client/ui/start

Not start_n
not start_n.png
not start.png
etc.

Just the "base name" of the 4 button state art files.

When the GuiBitmapButtonCtrl sees "path/start", it knows to look for start_n.png (or .jpg, or ... ) and start_d.png and ...
#3
01/23/2008 (9:15 am)
Thanks thats exatly what i needed :)
#4
01/23/2008 (9:27 am)
Thanks thats exatly what i needed :)