Thread: Onset varible
View Single Post
  #2  
Unread 03-27-2011, 04:16 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

I've found that modifying default buttons within the UI is a bad idea. Sometimes it'll work, and sometimes it won't. Other times you'll get unexpected results.
I like to think that these buttons already have "OnPress" events and adding another is sometimes a bad idea.

What I do is clone whatever "default UI" button it is I'm working with and call it another name and place it ontop of that button. I put my code I need to use in that button and make the final step of the code to trigger the "default" button. In this case it would be the add button.

With the code you're trying to do, I suggest just making 2 different buttons that get toggled visibly over the button. One button would trigger the Add button and auto close, the other would just trigger the Add button. You're check box could control which one is showing.

Cheers.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote