Welcome to IOPWiki, Commander.
We are searching for new editors to keep track of Girls' Frontline 2 content, as well as veteran players to complete the data of Girls' Frontline and Project Neural Cloud characters.
You can contribute without an account. Learn how to contribute and join our Discord server.

Widget:Live2DSwitcher: Difference between revisions

Welcome to IOP Wiki. This website is maintained by the Girls' Frontline community and is free to edit by anyone.
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
         var settingsContainer = container.find('.live2dsettings').first();
         var settingsContainer = container.find('.live2dsettings').first();
         var settings = gfUtils.live2dUtils.convertSettingsFromUl(settingsContainer);
         var settings = gfUtils.live2dUtils.convertSettingsFromUl(settingsContainer);
         for (costume in settings) {
         for (var idx=0; idx<settings.length; idx++) {
           for (variant in costume) {
          var currentSettings = settings[idx];
             var id = doll + "|" + costume.costumeId + "|" + variant.variantId;
           for (variant in currentSettings) {
             var name = variant.name;
            if (variant == "costumeId") {
              continue;
            }
           
             var id = doll + "|" + currentSettings.costumeId + "|" + variant;
             var name = currentSettings[variant].name;
             if (!name) {
             if (!name) {
               name = costume.costumeId + " - " + variant.variantId;
               name = currentSettings.costumeId + " - " + variant;
             }
             }
             container.find('.live2dswitcher').append($('<option>', {
             container.find('.live2dswitcher').append($('<option>', {
Line 25: Line 30:
           }
           }
         }
         }
        console.log(settings);
       });
       });
     });
     });
Line 49: Line 53:


</script>
</script>
<select class="gf-droplist live2dswitcher" style="flex-grow: 1;" autocomplete="off" onchange="swap_model(this)" >
<label>Costume:</label><select class="gf-droplist live2dswitcher" style="flex-grow: 1;" autocomplete="off" onchange="swap_model(this)" >
<option value="" selected="selected">Loading...</option>
<option value="" selected="selected">Loading...</option>
</select></div></includeonly><noinclude>
</select></div></includeonly><noinclude>

Revision as of 16:02, 15 September 2018