Computer Science Canada

Menu issues...

Author:  Alex C. [ 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


Author:  Alex C. [ Fri Jan 20, 2012 9:05 am ]
Post subject:  RE:Menu issues...

Sad

Author:  Zren [ Fri Jan 20, 2012 9:15 am ]
Post subject:  RE:Menu issues...

Because you never update xmouse and ymouse.

Author:  Alex C. [ Fri Jan 20, 2012 9:23 am ]
Post subject:  RE:Menu issues...

....oh my god...thank you for fixing such an idiotic mistake... :facepalm:


: