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

Username:   Password: 
 RegisterRegister   
 How do i draw a button on top of another button, and how do i erase said drawn on top button after
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Raditude




PostPosted: Sun Jun 13, 2010 3:23 pm   Post subject: How do i draw a button on top of another button, and how do i erase said drawn on top button after

What is it you are trying to achieve?
Trying to put a button on top of another button, and also erase this button after im done with it


What is the problem you are having?
Whenever i "draw" a button on top of another and i click it, it only senses that im clicking the button underneath.
How do i make it so that the button is truly on top, and what is the command to erase a button afterwards?


Describe what you have tried to solve this problem

I've tried changing the location of the button on top to just slightly above, but it still doesn't work.


Please specify what version of Turing you are using
4.1.1 alpha
Sponsor
Sponsor
Sponsor
sponsor
USEC_OFFICER




PostPosted: Sun Jun 13, 2010 6:22 pm   Post subject: RE:How do i draw a button on top of another button, and how do i erase said drawn on top button after

Tip: Don't use the Turing GUI unless you have to. It's terrible.
Monduman11




PostPosted: Sun Jun 13, 2010 6:25 pm   Post subject: RE:How do i draw a button on top of another button, and how do i erase said drawn on top button after

its easier if you do it with mousewhere
Tony




PostPosted: Sun Jun 13, 2010 6:35 pm   Post subject: RE:How do i draw a button on top of another button, and how do i erase said drawn on top button after

There is no z-ordering for Turing's GUI buttons; that is, neither button is "on top", they are all on the same flat field. Always. If one button is drawn after another, then its outline will make it look more complete.

If two buttons overlap in the click space, it appears that the earlier created button will register the event first. You could disable a button to make it unclickable. Note: the button does not even need to be drawn to be clicked -- this confuses some people.

Another note: Mouse.Where will have the same issues (can't distinguish between two overlapping regions), but since you are not making any assumptions about the system it will be easier to understand and work around the problem.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Unnamed.t




PostPosted: Sun Jun 13, 2010 7:08 pm   Post subject: Re: How do i draw a button on top of another button, and how do i erase said drawn on top button after

My Suggestion is to look into the GUI.Disable command. This should stop from the first occuring button to be clicked rather than the one that occurs on top of it. Whenever you want to change to the earlier button use GUI.Disable. I recommend that you organize your code into procedures when doing this.
Cezna




PostPosted: Mon Jun 14, 2010 5:19 am   Post subject: RE:How do i draw a button on top of another button, and how do i erase said drawn on top button after

Are you using Turing's GUI, or your own buttons?
If the answer is the GUI, I recommend that you do it yourself, as the GUI is not very versatile.

If it is not the GUI, then the only way you can get help is to post the code.
If it is the GUI, you might want to post the code anyway.

(posted in the other thread by accident, didn't see there were two)
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: