Widget:costumeSwitcher: Difference between revisions
Jump to navigation
Jump to search
Pianoforte (talk | contribs) No edit summary |
Setting the dorm spritemap for the selected option of the costume |
||
Line 22: | Line 22: | ||
var chibiCostumeName = ""; | var chibiCostumeName = ""; | ||
if (costumeSelectionIndex != 0) { | if (costumeSelectionIndex != 0) { | ||
chibiCostumeName = "_costume" + costumeSelectionIndex | chibiCostumeName = "_costume" + costumeSelectionIndex; | ||
} | } | ||
var selectedOption = selectBox.find(':selected'); | |||
selectBox.closest('.costumeContainer').find('.tdoll_chibi').attr('data-tdoll-use-dorm-spritemap', selectedOption.attr('data-tdoll-use-dorm-spritemap')=="true"); | |||
selectBox.closest('.costumeContainer').find('.chibiAnimation,.live2dAnimation,.artTab').trigger("costume_changed", chibiCostumeName); | selectBox.closest('.costumeContainer').find('.chibiAnimation,.live2dAnimation,.artTab').trigger("costume_changed", chibiCostumeName); |