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

Username:   Password: 
 RegisterRegister   
 Button help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
HaVoC




PostPosted: 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
Sponsor
sponsor
overcoat




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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
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  [ 6 Posts ]
Jump to:   


Style:  
Search: