Search in sources :

Example 1 with MessageClientGuiSetArmourerSkinType

use of riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiSetArmourerSkinType in project Armourers-Workshop by RiskyKen.

the class GuiTabArmourerMain method onDropDownListChanged.

@Override
public void onDropDownListChanged(GuiDropDownList dropDownList) {
    DropDownListItem listItem = dropDownList.getListSelectedItem();
    ISkinType skinType = SkinTypeRegistry.INSTANCE.getSkinTypeFromRegistryName(listItem.tag);
    ((GuiArmourer) parent).skinTypeUpdate(skinType);
    PacketHandler.networkWrapper.sendToServer(new MessageClientGuiSetArmourerSkinType(skinType));
}
Also used : MessageClientGuiSetArmourerSkinType(riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiSetArmourerSkinType) DropDownListItem(riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList.DropDownListItem) ISkinType(riskyken.armourersWorkshop.api.common.skin.type.ISkinType) GuiArmourer(riskyken.armourersWorkshop.client.gui.armourer.GuiArmourer)

Example 2 with MessageClientGuiSetArmourerSkinType

use of riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiSetArmourerSkinType in project Armourers-Workshop by RiskyKen.

the class GuiMiniArmourerBuilding method onDropDownListChanged.

@Override
public void onDropDownListChanged(GuiDropDownList dropDownList) {
    if (dropDownList == dropDownSkins) {
        DropDownListItem listItem = dropDownList.getListSelectedItem();
        ISkinType skinType = SkinTypeRegistry.INSTANCE.getSkinTypeFromRegistryName(listItem.tag);
        updatePartsDropDown(skinType);
        PacketHandler.networkWrapper.sendToServer(new MessageClientGuiSetArmourerSkinType(skinType));
    }
    if (dropDownList == dropDownParts) {
        String partName = dropDownParts.getListSelectedItem().tag;
        ISkinPartType skinPartType = SkinTypeRegistry.INSTANCE.getSkinPartFromRegistryName(partName);
        model.currentSkinPartType = skinPartType;
    }
}
Also used : MessageClientGuiSetArmourerSkinType(riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiSetArmourerSkinType) DropDownListItem(riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList.DropDownListItem) ISkinType(riskyken.armourersWorkshop.api.common.skin.type.ISkinType) ISkinPartType(riskyken.armourersWorkshop.api.common.skin.type.ISkinPartType)

Aggregations

ISkinType (riskyken.armourersWorkshop.api.common.skin.type.ISkinType)2 DropDownListItem (riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList.DropDownListItem)2 MessageClientGuiSetArmourerSkinType (riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiSetArmourerSkinType)2 ISkinPartType (riskyken.armourersWorkshop.api.common.skin.type.ISkinPartType)1 GuiArmourer (riskyken.armourersWorkshop.client.gui.armourer.GuiArmourer)1