<commit_before>/*
 * Copyright (C) 2013 cazzar
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with this program.  If not, see [http://www.gnu.org/licenses/].
 */

package net.cazzar.mods.jukeboxreloaded.gui;

import net.cazzar.corelib.client.gui.TexturedButton;
import net.cazzar.corelib.lib.SoundSystemHelper;
import net.cazzar.mods.jukeboxreloaded.items.ItemPortableJukebox;
import net.minecraft.client.gui.GuiButton;
import net.cazzar.corelib.client.gui.TexturedButton;
import net.cazzar.mods.jukeboxreloaded.items.PortableJukeboxHelper;
import net.cazzar.mods.jukeboxreloaded.lib.Strings;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.EntityPlayer;
import org.lwjgl.opengl.GL11;

import static net.cazzar.mods.jukeboxreloaded.lib.Reference.JukeboxGUIActions.*;
import static net.cazzar.mods.jukeboxreloaded.lib.Reference.JUKEBOX_GUI_TEXTURE;
import static net.cazzar.mods.jukeboxreloaded.lib.Reference.JukeboxGUIActions.*;
import static net.cazzar.mods.jukeboxreloaded.lib.Reference.PORTABLE_JUKEBOX_GUI_TEXTURE;
import static net.cazzar.mods.jukeboxreloaded.lib.Strings.*;

public class GuiPortableJukebox extends GuiContainer {
    private TexturedButton btnPlay, btnStop, /*btnShuffleOn, btnShuffleOff, btnRepeatAll, btnRepeatOne, btnRepeatOff,*/
            btnNext, btnPrev;
    private GuiButton volUp, volDown;
    private PortableJukeboxHelper helper;

    public GuiPortableJukebox(EntityPlayer player) {
        this(new ContainerPortableJukebox(player.inventory), player);
    }

    public GuiPortableJukebox(Container container, EntityPlayer player) {
        super(container);

        helper = new PortableJukeboxHelper(player, player.getHeldItem());
    }

    @Override
    protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
        updateButtonStates();
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        final int xStart = (width - xSize) / 2;
        final int yStart = (height - ySize) / 2;
        mc.renderEngine.func_110577_a(PORTABLE_JUKEBOX_GUI_TEXTURE);
        drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize);
    }

    @Override
    protected void actionPerformed(GuiButton button) {
        switch (button.id) {
            case PLAY:<commit_msg>Ohyay, ily git<commit_after>/*
 * Copyright (C) 2013 cazzar
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with this program.  If not, see [http://www.gnu.org/licenses/].
 */

package net.cazzar.mods.jukeboxreloaded.gui;

import net.cazzar.corelib.client.gui.TexturedButton;
import net.cazzar.mods.jukeboxreloaded.items.PortableJukeboxHelper;
import net.cazzar.mods.jukeboxreloaded.lib.Strings;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import org.lwjgl.opengl.GL11;

import static net.cazzar.mods.jukeboxreloaded.lib.Reference.JUKEBOX_GUI_TEXTURE;
import static net.cazzar.mods.jukeboxreloaded.lib.Reference.JukeboxGUIActions.*;
import static net.cazzar.mods.jukeboxreloaded.lib.Reference.PORTABLE_JUKEBOX_GUI_TEXTURE;

public class GuiPortableJukebox extends GuiContainer {
    private TexturedButton btnPlay, btnStop, /*btnShuffleOn, btnShuffleOff, btnRepeatAll, btnRepeatOne, btnRepeatOff,*/
            btnNext, btnPrev;
    private GuiButton volUp, volDown;
    private PortableJukeboxHelper helper;

    public GuiPortableJukebox(EntityPlayer player) {
        this(new ContainerPortableJukebox(player.inventory), player);
    }

    public GuiPortableJukebox(Container container, EntityPlayer player) {
        super(container);

        helper = new PortableJukeboxHelper(player, player.getHeldItem());
    }

    @Override
    protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
        //updateButtonStates();
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        final int xStart = (width - xSize) / 2;
        final int yStart = (height - ySize) / 2;
        mc.renderEngine.func_110577_a(PORTABLE_JUKEBOX_GUI_TEXTURE);
        drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize);
    }

    @Override
    protected void actionPerformed(GuiButton button) {
        switch (button.id) {
            case PLAY:
{'fraction_non_alphanumeric': 0.08574569439355074, 'fraction_numerical': 0.010260168559912056, 'mean_word_length': 3.7928007023705006, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5325564', 'n_tokens_mistral': 1760, 'n_tokens_neox': 1698, 'n_words': 437}