Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Menu issues...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Alex C.




PostPosted: Fri Jan 20, 2012 8:56 am   Post subject: Menu issues...

Hi guys, I have a bit of an issue with my button I made. When I click on it, it should be able to exit but it gets stuck in that loop... Confused Any ideas?

Turing:


% 3) If the user hits "HELP"
        if xmouse > 535 and xmouse < 853 and ymouse > 102 and ymouse < 135 then
            Draw.Polygon (x_menu_title_animate, y3_menu_title_animate, 8, yellow) % Highlights the button
            View.Update
            if button = 1 then
                transition
                put " "
                put "       Welcome to Hyper Storm. Your mission as a pilot is to destroy as many enemy ships possible."
                put "       The navigational controls for your ship are 'W & S' for 'Up & Down' and 'A & D' for left &"
                put "       right. Attack the enemies with the 'F' key. Good luck soldier! It's dangerous out there..."
                Pic.Draw (QUIT, 294, 52, 0)
                View.Update
                loop
%WHY IT NO WORK... T_T
                    if xmouse > 294 and xmouse < 612 and ymouse > 52 and ymouse < 85 then
                        exit when button = 1
                    end if
                end loop
            end if
        end if

Sponsor
Sponsor
Sponsor
sponsor
Alex C.




PostPosted: Fri Jan 20, 2012 9:05 am   Post subject: RE:Menu issues...

Sad
Zren




PostPosted: Fri Jan 20, 2012 9:15 am   Post subject: RE:Menu issues...

Because you never update xmouse and ymouse.
Alex C.




PostPosted: Fri Jan 20, 2012 9:23 am   Post subject: RE:Menu issues...

....oh my god...thank you for fixing such an idiotic mistake... :facepalm:
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: