package com.yolp900.itsjustacharm.client.guis;
import com.yolp900.itsjustacharm.reference.LibGuis;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.ResourceLocation;
public abstract class ModGuiScreen extends GuiScreen {
int left, top;
private final int guiWidth, guiHeight;
private ResourceLocation texture;
LibGuis gui;
public ModGuiScreen(LibGuis gui, int width, int height) {
this.gui = gui;
this.texture = gui.getBackground();
this.guiWidth = width;
this.guiHeight = height;
}
@Override
public void initGui() {
left = width / 2 - guiWidth / 2;
top = height / 2 - guiHeight / 2;
}
@Override
public void drawScreen(int par1, int par2, float par3) {
mc.renderEngine.bindTexture(texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(left, top, 0, 0, guiWidth, guiHeight);
onDrawScreen(par1, par2, par3);
}
abstract void onDrawScreen(int par1, int par2, float par3);
@Override
public abstract boolean doesGuiPauseGame();
}