EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Unread 03-27-2011, 04:09 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default Onset varible

I have an option in my collections window that when you hit the add button it adds the collectible to the collection (normal) and than auto closes the window.

Now instead of having this on the add button all the time, i wish to add a checkbox at the bottom of the window that sets this variable.

OnSet=Parent.Parent.CollectionTemplate.AddButton.OnPress='hide_window Journals.JournalsQuest'
UnSet=Parent.Parent.CollectionTemplate.AddButton.OnPress='' (blank so it removes the behavior)

This is all done thru the default window so the hierarchy and such is normal other than the on added checkbox i added at the bottom, which is at the same location as the other 2 checkboxes.

Now my issues is the checkbox doesnt change the OnPress varible when in-game. What am I doing wrong here?

Thanks,
Draven
Reply With Quote
  #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
  #3  
Unread 03-27-2011, 04:20 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

I was thinking of that also but two problems come to mind
  • What variable should i use on the new buttons?
  • Adding the OnPress to the default button works fine, its just doesn't change dynamically in-game, it just changes each time i load the UI.

I am working on a diffrent part of the UI right now, i'll try the 2 button idea in a minute or so and report back sir.

Thanks,
Draven
Reply With Quote
  #4  
Unread 03-27-2011, 04:24 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

I changed the name of the button and it doesn't work now. First off its always visible and when you press the button the collectible item isn't added to the collection.

Draven
Reply With Quote
  #5  
Unread 03-27-2011, 04:48 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

OK re-reading your reply i think i miss understood you.

{AutoClose} <-- Add the auto close visible code to effect this one?
Make the checkbox effect this buttons visible?
How do I make this button "fire" the default button?

{Default add}

I hope i understood it ok this time around, sorry

Thanks,
Draven
Reply With Quote
  #6  
Unread 03-27-2011, 04:57 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

It isn't working for two reasons. One is what Drumstix said, the other is that you are only modifying the template row, not the actual row. So make sure that you create that custom button within the template. Also your checkbox will not affect anything, have your code within the new button check the state of the checkbox instead.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:50 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI