
-----------------------------------
Sam_sam
Mon Jan 05, 2009 6:37 pm

Another Button Problem :(
-----------------------------------
Well, this time I got a lot futher. If you don't know what I am talking about you can
refer to Post: How to make button help!?!
Now, I am trying to enable my "customers" to be able to click on an image, and it has to activate in response
by showing information on it. This is what my code looks like so far, don't mind the commented out ones. I really need help with the uncommented ones.


%  Pic.ScreenLoad ("Chic.jpg",21 , 227, picCopy)
% loop
%     delay (1000)
%
%     var x, y, buttonnumber, buttonupdown : int
%     buttonwait ("down", x, y, buttonnumber, buttonupdown)
%     put x
%     put y
% end loop

%---------------------% WELCOME %---------------------------%
var x, y, buttonnumber, buttonupdown : int
var fontPapyrus : int
var fontArial : int
var fontArial1 : int
setscreen ("graphics")
colorback (yellow)
cls
fontPapyrus := Font.New ("Papyrus:30:italic")
fontArial := Font.New ("Arial:12:italic")
fontArial1 := Font.New ("Arial:12:bold")
Font.Draw ("Welcome to The Chicken Wing ", 32, 345, fontPapyrus, 1)
Font.Draw ("Factory", 216, 277, fontPapyrus, 1)
Font.Draw ("\"Once you come, you'll never go back\"", 272, 58, fontArial, 1)
Pic.ScreenLoad ("chicken.jpg", 0, 0, picCopy)
delay (2000)
cls

%--------------------% OVERVIEW %--------------------------------%
drawbox (15,181,214,349,1) 
drawbox (361,182,611,348,1)
drawbox (22,22,221,167,1)
drawbox (358,23,556,173,1)

Pic.ScreenLoad ("Chic.jpg", 15, 182, picCopy)
Pic.ScreenLoad ("Lime Chicken.jpg", 361, 182, picCopy)
Pic.ScreenLoad ("SweetnSourchicken.jpg", 22, 22, picCopy)
Pic.ScreenLoad ("SpicyChicken.jpg", 358, 22, picCopy)
fontPapyrus := Font.New ("Papyrus:30:italic")
Font.Draw ("Click On An Image To See More", 20, 360, fontPapyrus, 1)

buttonwait ("down", x, y, buttonnumber, buttonupdown)
Font.Draw ("Menu", maxx - 75, 35, fontArial, 1)
drawbox (maxx - 25, 30, maxx - 85, 55, 1)
buttonwait ("down", x, y, buttonnumber, buttonupdown)

if (x < 15 and x > 214 and y < 181 and y > 349) then % OVER HERE! 