Post by Wayne Rayner on Jan 9, 2010 7:17:31 GMT -5
hey guys I'm really confused (like always).
crazynate posted this menu system for one of my other problems. I decided to make one that will work the way I want it to work, except for the parti it doesn't work. I don't like using textmode (buffered) or whatever I plainly hate it.
Anyone who can help me I would greatly appreciate it. I will probably need help with this same project again soon.
here is the code
Thanks for helping me
yours
Wayne Rayner
crazynate posted this menu system for one of my other problems. I decided to make one that will work the way I want it to work, except for the parti it doesn't work. I don't like using textmode (buffered) or whatever I plainly hate it.
Anyone who can help me I would greatly appreciate it. I will probably need help with this same project again soon.
here is the code
dim start, options, exit, men_tex (2)
dim cursor (1)
dim buttonactive, pageactive
dim name$
' main loop
men_tex (0) = LoadTex ("images\start.png")
men_tex (1) = LoadTex ("images\options.png")
men_tex (2) = LoadTex ("images\exit.png")
start = NewSprite (men_tex (0))
SprSetSize (150,50)
SprSetPos (320,100)
BindSprite (start)
options = NewSprite (men_tex (1))
SprSetSize (150,50)
SprSetPos (320,200)
BindSprite (options)
exit = NewSprite (men_tex (2))
SprSetSize (150,50)
SprSetPos (320,300)
BindSprite (exit)
cursor(0) = mouse_x()*640
cursor(1) = mouse_y()*480
while TRUE
if cursor(0)>(sprleft(start)) and cursor(0)<(sprright(start)) and cursor(1)>(sprtop(start)) and cursor(1)<(sprbottom(start)) then
buttonactive = 1
endif
if cursor(0)>(sprleft(options)) and cursor(0)<(sprright(options)) and cursor(1)>(sprtop(options)) and cursor(1)<(sprbottom(options)) then
buttonactive = 2
endif
if cursor(0)>(sprleft(exit)) and cursor(0)<(sprright(exit)) and cursor(1)>(sprtop(exit)) and cursor(1)<(sprbottom(exit)) then
buttonactive = 3
endif
if mouse_button(0)= TRUE and buttonactive = 1 then
pageactive = 1
gosub start
endif
if mouse_button(0)= TRUE and buttonactive = 2 then
pageactive = 2
endif
if mouse_button(0)= TRUE and buttonactive = 3 then
pageactive = 3
endif
wend
start:
deletesprite (start)
deletesprite (options)
deletesprite (exit)
sleep (1000)
printr "whats your user name"
input name$
sleep (1000)
data 0,0,0,0
data 0,0,0,0
data 0,0,0,0
data 0,0,0,0
dim tiles(0)(0), tilemap
tilemap = NewTileMap (LoadTex ("images\tilemap.png"))
SprSetTiles (tiles)
Thanks for helping me
yours
Wayne Rayner