Widget:costumeSwitcher: Difference between revisions
Jump to navigation
Jump to search
Trigger change for modswitcher on startup |
Toggling the mod-button |
||
Line 23: | Line 23: | ||
valField.text(newValue); | valField.text(newValue); | ||
} | } | ||
} | |||
// ToDo: find a better way of finding out if it's a mod | |||
// ToDo: find a better way of telling which skills are available with which mod | |||
var isMod = selectBox.find(':selected').text().indexof('MOD') >= 0; | |||
statContainer.find('.skillform .tabButtonLane button').last().toggle(isMod); | |||
// With mod-change the visible skillbuttons might change, too, so trigger the last visible one | |||
// For now it only has to be set if we change to Base, as it has only one skill | |||
if (!isMod) { | |||
statContainer.find('.skillform .tabButtonLane button:visible').last().click(); | |||
} | } | ||
} | } |