Button help
Author |
Message |
HaVoC
|
Posted: Tue Jan 20, 2004 12:39 pm Post subject: Button help |
|
|
What is the command? So far I have
code: | btn := 2
if Mouse.Where (qx, qy, btn) = Mouse.Where(qx,qy,btn) then
locatexy (40, 110)
put word
end if |
I know that if statement can't work, but You get the point of what I'm trying to do... |
|
|
|
|
|
Sponsor Sponsor
|
|
|
overcoat
|
Posted: Tue Jan 20, 2004 3:04 pm Post subject: (No subject) |
|
|
do u want 2 help with making buttons???
import GUI
var button:= GUI.CreateButtonFull (maxx div 2 - 40, maxy div 2 - 60, 0, "Exit", GUI.Quit, 0, '^Q', false)
loop
exit when GUI.ProcessEvent
end loop
u dont need mousewhere 4 that |
|
|
|
|
|
AsianSensation
|
Posted: Tue Jan 20, 2004 9:05 pm Post subject: (No subject) |
|
|
overcoat, you are stupid.
havoc, I think you are trying for something like this?
code: | if btn = 2 then
blah blah blah
end if |
Mouse.Where will assign a value to btn. |
|
|
|
|
|
HaVoC
|
Posted: Fri Jan 23, 2004 9:54 am Post subject: (No subject) |
|
|
Yeah that''s it. Except I have other values. See I have mathematical equations falling down the screen, and when a user clicks it, it does what i want it do.
So basicly I need seomthing like,
if questionx <= 100 and questionx >=50
blah blah
end if
but how would I do that? |
|
|
|
|
|
McKenzie
|
Posted: Fri Jan 23, 2004 11:31 am Post subject: (No subject) |
|
|
Havoc, checking to see if they clicked on your equation is the same as checking if they clicked on a box, which in turn is the same as graphing inequalities in math (it is a math program right?)
drawbox(left,bott,right,top,c)
<in loop>
if mousex > left and mousex < right and mousey > bott and mousey < top and button >0 then
... |
|
|
|
|
|
Cervantes
|
Posted: Fri Jan 23, 2004 1:56 pm Post subject: (No subject) |
|
|
death to pre-existing GUI!!
I haven't learned GUI and don't intend to until my compsci class makes me. I'd much rather make my own GUI. and I do that like Mackenzie just said |
|
|
|
|
|
|
|