|
Post by Wayne Rayner on Nov 3, 2012 10:00:12 GMT -5
Hey guys. This program uses code from my menu system program which I made a long long while ago. I made this because my menu's for my game will use this to help my users know what to do in certain parts of my game. code: '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Mouse Tooltips ' Version 0.0.1 ' Created by Wayne Rayner '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Variables dim buttonactive, button, cursor(1), tex '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Program tex = LoadTex ("graphics/button.jpg")
button = NewSprite (tex) SprSetPos (320,240) SprSetSize (98,32) BindSprite (button)
while true TextMode (TEXT_BUFFERED) color (255,0,0) ResizeText (60,30)
cursor(0) = Mouse_X()*640 cursor(1) = Mouse_Y()*480
if cursor(0)>(SprLeft(button)) and cursor(0)<(SprRight(button)) and cursor(1)>(SprTop(button)) and cursor(1)<(SprBottom(button)) then locate Mouse_X() * TextCols (),Mouse_Y() * TextRows (): print "This is a button tooltip " buttonactive = 1 endif DrawText () wend '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' The line locate 0,0: was changed to locate Mouse_X() * TextCols (), Mouse_Y() * TextRows(): Well these small programs the regkey and this will all be going into all my game projects. My next mini program will be a save load program If you have use for it thats good if not I'm not to worried Regards Wayne Rayner Attachments:
|
|
|
Post by matthew on Nov 6, 2012 17:11:05 GMT -5
You seem to be writing a lot of programs recently Wayne. :-)
What got you interested back in programming?
|
|
|
Post by Wayne Rayner on Nov 7, 2012 3:16:29 GMT -5
Well I cant exactly say but I believe it is because I have a) got a lot of spare time and b) because I like to challenge myself in adding things to what I already know and c) I want to create a full game from start to finish
Regards
Wayne Rayner
|
|
|
Post by Darkjester on Nov 8, 2012 16:49:49 GMT -5
Well this is looking good wayne!
|
|