Quote:
Originally Posted by Mathias
The M/P/S options in WoD are handled with trigger buttons.
|
Mathias,
I was able to deduce that from the ui_styles file, but I'm struggling with the scripting for the actual trigger.
I set up the top row as a table_fixed in a template, and am trying to get the control work for Primary / Secondary swap of dots working. Here is what I've come up with so far:
Code:
<portal
id="swapPS"
style="actSwap"
tiptext="Click here to swap Primary and Secondary dots.">
<action
action="trigger">
<trigger><![CDATA[
if (hero.child[cPhysical].field[cmaximum].value = herofield[acPrimAttr].value) then
if (hero.child[cSocial].field[cmaximum].value = herofield[acSecoAttr].value) then
hero.child[cSocial].field[cmaximum].value = herofield[acPrimAttr].value
hero.child[cPhysical].field[cmaximum].value = herofield[acSecoAttr].value
elseif (hero.child[cMental].field[cmaximum].value = herofield[acSecoAttr].value) then
hero.child[cPhysical].field[cmaximum].value = herofield[acSecoAttr].value
hero.child[cMental].field[cmaximum].value = herofield[acPrimAttr].value
endif
elseif (hero.child[cSocial].field[cmaximum].value = herofield[acPrimAttr].value) then
if (hero.child[cPhysical].field[cmaximum].value = herofield[acSecoAttr].value) then
hero.child[cPhysical].field[cmaximum].value = herofield[acPrimAttr].value
hero.child[cSocial].field[cmaximum].value = herofield[acSecoAttr].value
elseif (hero.child[cMental].field[cmaximum].value = herofield[acSecoAttr].value) then
hero.child[cMental].field[cmaximum].value = herofield[acPrimAttr].value
hero.child[cSocial].field[cmaximum].value = herofield[acSecoAttr].value
endif
elseif (hero.child[cMental].field[cmaximum].value = herofield[acPrimAttr].value) then
if (hero.child[cPhysical].field[cmaximum].value = herofield[acSecoAttr].value) then
hero.child[cPhysical].field[cmaximum].value = herofield[acPrimAttr].value
hero.child[cMental].field[cmaximum].value = herofield[acSecoAttr].value
elseif (hero.child[cSocial].field[cmaximum].value = herofield[acSecoAttr].value) then
hero.child[cSocial].field[cmaximum].value = herofield[acPrimAttr].value
hero.child[cMental].field[cmaximum].value = herofield[acSecoAttr].value
endif
endif
]]></trigger>
</action>
</portal>
The code doesn't work correctly. It swaps out the dots but nothing on the interface changes, and if you start adding dots to the attributes themselves it switches back to whatever the starting definition for the dots is set to.