forums

TNT Basic Forums > Programming Q&A
invisible buttons
< Last Thread     Next Thread >
Author
Thread        Post A Reply

05-07-2003 11:16

Posted by:
mark_667

Location:
England

Click Here to Email mark_667   Find more posts by mark_667

Hi,
The below code loads the background image (Res ID 133) OK, but the buttons do not load at all, even though there is obviously a draw frame command called. The default image bank is not used, but the set image bank command looks like it has been delcared OK. And in case you're wondering about the sprite IDs, yes I do want the 'pressed' and 'hover' sprites to use the same sprites for a button.

Draw picture 133
set image bank 129, "Buttons"
new button 0,321,150,0,1,1,129
new button 1,321,205,2,3,3,129
new button 2,321,276,4,5,5,129
new button 3,321,331,6,7,7,129
draw frame
wait button click

thanks in advance for any advice,
mark_667

05-07-2003 14:05

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Load Images 129?

;-)

05-07-2003 22:52

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

TNT really should warn you whenever you try using images that are not loaded :(.

TNT is not very good at reporting mistakes

TNT also failed to find this mistake:

for n=0 to 1
next x

it crashed! I know there are several other failures but I can't remember what right now, so if you find some, post them!

05-08-2003 12:34

Posted by:
mark_667

Location:
England

Click Here to Email mark_667   Find more posts by mark_667

Huh?

Quote
Load Images 129?

;-)
End quote

What do you mean? I am not loading image ID 129, the only times I use the number in the above codew is to firstly set the image bank, then to reference the sprites from them. Are the button commands syntaxed badly and TNT not picking up on it or something?

mark_667

05-08-2003 15:07

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

before you use an image bank you have to write

"load images *banknumber*"

05-08-2003 18:18

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Crash

OK, I've logged that crash, we'll fix it for the next version - sorry about that! Make sure you tell us of any crashes you get, TNT Basic should never crash no matter how strange the code is you tell it to run.

We don't consider it an error to set a sprite to an image past the end of the bank, or to a bank that isn't loaded. We could change this in the future, which might make it easier to catch bugs where the program hasn't loaded images it is trying to use, but at the moment it's completely legal and hence there's no error.

Are there any other problems that you feel TNT Basic could handle better?

Cheers,

Mark

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.