Search in sources :

Example 1 with GuiControlSkinPanel

use of riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel in project Armourers-Workshop by RiskyKen.

the class GuiGlobalLibraryPanelSearchResults method actionPerformed.

@Override
protected void actionPerformed(GuiButton button) {
    if (button.id == 1) {
        changePage(currentPageIndex - 1);
    }
    if (button.id == 2) {
        changePage(currentPageIndex + 1);
        if (currentPageIndex + 1 < totalPages) {
            fetchPage(currentPageIndex + 1);
        }
    }
    if (button == iconButtonSmall) {
        iconScale = 50;
        skinPanelResults.setIconSize(iconScale);
        resize();
    }
    if (button == iconButtonMedium) {
        iconScale = 80;
        skinPanelResults.setIconSize(iconScale);
        resize();
    }
    if (button == iconButtonLarge) {
        iconScale = 110;
        skinPanelResults.setIconSize(iconScale);
        resize();
    }
    if (button == skinPanelResults) {
        SkinIcon skinIcon = ((GuiControlSkinPanel) button).getLastPressedSkinIcon();
        if (skinIcon != null) {
            ((GuiGlobalLibrary) parent).panelSkinInfo.displaySkinInfo(skinIcon.getSkinJson(), Screen.SEARCH);
        }
    }
}
Also used : GuiControlSkinPanel(riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel) SkinIcon(riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel.SkinIcon)

Example 2 with GuiControlSkinPanel

use of riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel in project Armourers-Workshop by RiskyKen.

the class GuiGlobalLibraryPanelUserSkins method actionPerformed.

@Override
protected void actionPerformed(GuiButton button) {
    if (button.id == 1) {
        changePage(currentPageIndex - 1);
    }
    if (button.id == 2) {
        changePage(currentPageIndex + 1);
        if (currentPageIndex + 1 < totalPages) {
            fetchPage(currentPageIndex + 1);
        }
    }
    if (button == iconButtonSmall) {
        iconScale = 50;
        skinPanelResults.setIconSize(iconScale);
        resize();
    }
    if (button == iconButtonMedium) {
        iconScale = 80;
        skinPanelResults.setIconSize(iconScale);
        resize();
    }
    if (button == iconButtonLarge) {
        iconScale = 110;
        skinPanelResults.setIconSize(iconScale);
        resize();
    }
    if (button == skinPanelResults) {
        SkinIcon skinIcon = ((GuiControlSkinPanel) button).getLastPressedSkinIcon();
        if (skinIcon != null) {
            ((GuiGlobalLibrary) parent).panelSkinInfo.displaySkinInfo(skinIcon.getSkinJson(), Screen.USER_SKINS);
        }
    }
}
Also used : GuiControlSkinPanel(riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel) SkinIcon(riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel.SkinIcon)

Example 3 with GuiControlSkinPanel

use of riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel in project Armourers-Workshop by RiskyKen.

the class GuiGlobalLibraryPanelHome method actionPerformed.

@Override
protected void actionPerformed(GuiButton button) {
    if (button == buttonShowAll) {
        ((GuiGlobalLibrary) parent).panelSearchResults.clearResults();
        ((GuiGlobalLibrary) parent).switchScreen(Screen.SEARCH);
        ((GuiGlobalLibrary) parent).panelSearchResults.doSearch("");
    }
    if (button == skinPanelRecentlyUploaded | button == skinPanelMostDownloaded | button == skinPanelMostLiked) {
        SkinIcon skinIcon = ((GuiControlSkinPanel) button).getLastPressedSkinIcon();
        if (skinIcon != null) {
            ((GuiGlobalLibrary) parent).panelSkinInfo.displaySkinInfo(skinIcon.getSkinJson(), Screen.HOME);
        }
    }
}
Also used : GuiControlSkinPanel(riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel) GuiGlobalLibrary(riskyken.armourersWorkshop.client.gui.globallibrary.GuiGlobalLibrary) SkinIcon(riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel.SkinIcon)

Aggregations

GuiControlSkinPanel (riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel)3 SkinIcon (riskyken.armourersWorkshop.client.gui.controls.GuiControlSkinPanel.SkinIcon)3 GuiGlobalLibrary (riskyken.armourersWorkshop.client.gui.globallibrary.GuiGlobalLibrary)1