From 70c1354a4a96698758a88c032866288f79de6f5a Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Sat, 24 Aug 2024 08:16:37 -0400 Subject: Initial commit --- .../fbs/gui/button/GuiButtonDestination.class | Bin 0 -> 1573 bytes .../fbs/gui/button/GuiButtonDestination.java | 35 ++++++ .../fbs/gui/button/GuiButtonEnchantment.class | Bin 0 -> 1663 bytes .../fbs/gui/button/GuiButtonEnchantment.java | 35 ++++++ .../fbs/gui/button/GuiButtonSpiritArrow.class | Bin 0 -> 1763 bytes .../fbs/gui/button/GuiButtonSpiritArrow.java | 43 +++++++ .../fbs/gui/button/GuiButtonSpiritCheckBox.class | Bin 0 -> 2200 bytes .../fbs/gui/button/GuiButtonSpiritCheckBox.java | 39 +++++++ .../fbs/gui/button/GuiButtonSpiritLearn.class | Bin 0 -> 3377 bytes .../fbs/gui/button/GuiButtonSpiritLearn.java | 50 +++++++++ .../fbs/gui/button/GuiButtonSpiritLearnDummy.class | Bin 0 -> 2051 bytes .../fbs/gui/button/GuiButtonSpiritLearnDummy.java | 31 ++++++ .../fbs/gui/button/GuiButtonSpiritMain.class | Bin 0 -> 4447 bytes .../fbs/gui/button/GuiButtonSpiritMain.java | 124 +++++++++++++++++++++ .../jp/plusplus/fbs/gui/button/GuiButtonWarp.class | Bin 0 -> 2131 bytes .../jp/plusplus/fbs/gui/button/GuiButtonWarp.java | 44 ++++++++ 16 files changed, 401 insertions(+) create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonDestination.class create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonDestination.java create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonEnchantment.class create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonEnchantment.java create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritArrow.class create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritArrow.java create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritCheckBox.class create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritCheckBox.java create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritLearn.class create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritLearn.java create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritLearnDummy.class create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritLearnDummy.java create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritMain.class create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritMain.java create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonWarp.class create mode 100644 src/main/java/jp/plusplus/fbs/gui/button/GuiButtonWarp.java (limited to 'src/main/java/jp/plusplus/fbs/gui/button') diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonDestination.class b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonDestination.class new file mode 100644 index 0000000..ac4e2ed Binary files /dev/null and b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonDestination.class differ diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonDestination.java b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonDestination.java new file mode 100644 index 0000000..ea00477 --- /dev/null +++ b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonDestination.java @@ -0,0 +1,35 @@ +package jp.plusplus.fbs.gui.button; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.renderer.OpenGlHelper; +import org.lwjgl.opengl.GL11; + +/** + * Created by plusplus_F on 2015/10/22. + */ +public class GuiButtonDestination extends GuiButton { + public boolean selected; + + public GuiButtonDestination(int p_i1020_1_, int p_i1020_2_, int p_i1020_3_) { + super(p_i1020_1_, p_i1020_2_, p_i1020_3_,86 ,20, ""); + enabled=false; + } + + public void setDisplayString(String str){ + displayString=str; + enabled=!str.isEmpty(); + } + + @Override + public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_) { + if (this.enabled && !displayString.isEmpty()) { + FontRenderer fontrenderer = p_146112_1_.fontRenderer; + this.mouseDragged(p_146112_1_, p_146112_2_, p_146112_3_); + int col=selected?0xffffff:0x404040; + + this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 16) / 2, col); + } + } +} diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonEnchantment.class b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonEnchantment.class new file mode 100644 index 0000000..d4af4de Binary files /dev/null and b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonEnchantment.class differ diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonEnchantment.java b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonEnchantment.java new file mode 100644 index 0000000..e25475d --- /dev/null +++ b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonEnchantment.java @@ -0,0 +1,35 @@ +package jp.plusplus.fbs.gui.button; + +import jp.plusplus.fbs.FBS; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +/** + * Created by plusplus_F on 2015/10/21. + */ +public class GuiButtonEnchantment extends GuiButton { + public static final ResourceLocation rl = new ResourceLocation(FBS.MODID+":textures/gui/enchant.png"); + + public GuiButtonEnchantment(int id, int x, int y) { + super(id, x, y, 28, 23, ""); + } + + @Override + public void drawButton(Minecraft par1Minecraft, int par2, int par3) { + if (this.visible) { + par1Minecraft.getTextureManager().bindTexture(rl); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + boolean onMouse = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height; + + int drawX = 176; + int drawY = 0; + + if (!this.enabled) drawY += height * 2; + else if (onMouse) drawY += height; + + this.drawTexturedModalRect(this.xPosition, this.yPosition, drawX, drawY, this.width, this.height); + } + } +} diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritArrow.class b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritArrow.class new file mode 100644 index 0000000..e42576a Binary files /dev/null and b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritArrow.class differ diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritArrow.java b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritArrow.java new file mode 100644 index 0000000..89e342c --- /dev/null +++ b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritArrow.java @@ -0,0 +1,43 @@ +package jp.plusplus.fbs.gui.button; + +import jp.plusplus.fbs.FBS; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +/** + * Created by plusplus_F on 2015/10/22. + */ +public class GuiButtonSpiritArrow extends GuiButton { + public static final ResourceLocation rl = new ResourceLocation(FBS.MODID+":textures/gui/spiritConfig.png"); + public boolean selected; + + public GuiButtonSpiritArrow(int id, int x, int y) { + super(id, x, y, 10, 15, ""); + } + + @Override + public void drawButton(Minecraft par1Minecraft, int par2, int par3) { + if (this.visible) { + par1Minecraft.getTextureManager().bindTexture(rl); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + boolean onMouse = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height; + + int drawX = 176; + int drawY = 15*id; + + if(id<2){ + if (!this.enabled) drawX += width * 2; + else if (onMouse) drawX += width; + } + else{ + if (!this.enabled) drawY += height * 2; + else if (onMouse) drawY += height; + } + + //selected?0xffffff:0x404040 + this.drawTexturedModalRect(this.xPosition, this.yPosition, drawX, drawY, this.width, this.height); + } + } +} diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritCheckBox.class b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritCheckBox.class new file mode 100644 index 0000000..257d8b2 Binary files /dev/null and b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritCheckBox.class differ diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritCheckBox.java b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritCheckBox.java new file mode 100644 index 0000000..5ebd4e1 --- /dev/null +++ b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritCheckBox.java @@ -0,0 +1,39 @@ +package jp.plusplus.fbs.gui.button; + +import jp.plusplus.fbs.FBS; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import org.lwjgl.opengl.GL11; + +/** + * Created by plusplus_F on 2015/11/14. + */ +public class GuiButtonSpiritCheckBox extends GuiButton { + public static final ResourceLocation rl = new ResourceLocation(FBS.MODID+":textures/gui/spiritConfig.png"); + public boolean checked; + public String keyString; + + public GuiButtonSpiritCheckBox(int id, int x, int y, String str) { + super(id, x, y, 10, 10, StatCollector.translateToLocal("spirit.config.fbs."+str)); + checked=false; + keyString=str; + } + + @Override + public void drawButton(Minecraft par1Minecraft, int par2, int par3) { + if (this.visible) { + par1Minecraft.getTextureManager().bindTexture(rl); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + int drawX = 176; + int drawY = 48; + + if(checked) drawY+=10; + + this.drawTexturedModalRect(this.xPosition, this.yPosition, drawX, drawY, this.width, this.height); + par1Minecraft.fontRenderer.drawString(displayString, xPosition + 11, yPosition + 1, 0x404040); + //drawString(par1Minecraft.fontRenderer, displayString, xPosition+11, yPosition+1, 0x404040); + } + } +} diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritLearn.class b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritLearn.class new file mode 100644 index 0000000..de5b8c1 Binary files /dev/null and b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritLearn.class differ diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritLearn.java b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritLearn.java new file mode 100644 index 0000000..280fcbe --- /dev/null +++ b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonSpiritLearn.java @@ -0,0 +1,50 @@ +package jp.plusplus.fbs.gui.button; + +import jp.plusplus.fbs.FBS; +import jp.plusplus.fbs.spirit.SkillManager; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import org.lwjgl.opengl.GL11; + +/** + * Created by plusplus_F on 2015/11/28. + */ +public class GuiButtonSpiritLearn extends GuiButton { + public static final ResourceLocation rl = new ResourceLocation(FBS.MODID+":textures/gui/spiritConfig.png"); + + public String[] skillStr=new String[0]; + public String skillName=""; + + public GuiButtonSpiritLearn(int id, int x, int y, String str) { + super(id, x, y, 34, 16, StatCollector.translateToLocal("spirit.gui.fbs.button."+str)); + } + + @Override + public void drawButton(Minecraft par1Minecraft, int par2, int par3) { + if (this.visible) { + par1Minecraft.getTextureManager().bindTexture(rl); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + boolean onMouse = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height; + + int drawX = 186; + int drawY = 48; + + if(!enabled) drawY+=32; + else if(onMouse) drawY+=16; + + this.drawTexturedModalRect(this.xPosition, this.yPosition, drawX, drawY, this.width, this.height); + drawCenteredString(par1Minecraft.fontRenderer, displayString, xPosition + width / 2, yPosition + (this.height - 8) / 2, enabled? 0xffffff:0xa0a0a0); + + for(int i=0;i= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height; + + int drawX = 176; + int drawY = 0; + + if(!enabled) drawY=32; + else if(onMouse) drawY=16; + + this.drawTexturedModalRect(this.xPosition, this.yPosition, drawX, drawY, this.width, this.height); + drawCenteredString(par1Minecraft.fontRenderer, displayString, xPosition + width / 2, yPosition + (this.height - 8) / 2, enabled? 0xffffff:0xa0a0a0); + } + } + + + public void drawHoveringText(List p_146283_1_, int p_146283_2_, int p_146283_3_, FontRenderer font) { + if (!p_146283_1_.isEmpty()) { + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_DEPTH_TEST); + int width = 0; + Iterator iterator = p_146283_1_.iterator(); + + while (iterator.hasNext()) { + String s = (String) iterator.next(); + int l = font.getStringWidth(s); + + if (l > width) { + width = l; + } + } + + int xMin = p_146283_2_ + 12; + int yMin = p_146283_3_ - 12; + int i1 = 8; + + if (p_146283_1_.size() > 1) { + i1 += 2 + (p_146283_1_.size() - 1) * 10; + } + + /* + if (xMin + width > this.width) { + xMin -= 28 + width; + } + + if (yMin + i1 + 6 > this.height) { + yMin = this.height - i1 - 6; + } + */ + + + //this.zLevel = 300.0F; + //itemRender.zLevel = 300.0F; + int color = -267386864; + this.drawGradientRect(xMin - 3, yMin - 4, xMin + width + 3, yMin - 3, color, color); + this.drawGradientRect(xMin - 3, yMin + i1 + 3, xMin + width + 3, yMin + i1 + 4, color, color); + this.drawGradientRect(xMin - 3, yMin - 3, xMin + width + 3, yMin + i1 + 3, color, color); + this.drawGradientRect(xMin - 4, yMin - 3, xMin - 3, yMin + i1 + 3, color, color); + this.drawGradientRect(xMin + width + 3, yMin - 3, xMin + width + 4, yMin + i1 + 3, color, color); + int k1 = 1347420415; + int l1 = (k1 & 16711422) >> 1 | k1 & -16777216; + this.drawGradientRect(xMin - 3, yMin - 3 + 1, xMin - 3 + 1, yMin + i1 + 3 - 1, k1, l1); + this.drawGradientRect(xMin + width + 2, yMin - 3 + 1, xMin + width + 3, yMin + i1 + 3 - 1, k1, l1); + this.drawGradientRect(xMin - 3, yMin - 3, xMin + width + 3, yMin - 3 + 1, k1, k1); + this.drawGradientRect(xMin - 3, yMin + i1 + 2, xMin + width + 3, yMin + i1 + 3, l1, l1); + + for (int i2 = 0; i2 < p_146283_1_.size(); ++i2) { + String s1 = (String) p_146283_1_.get(i2); + font.drawStringWithShadow(s1, xMin, yMin, -1); + + if (i2 == 0) { + yMin += 2; + } + + yMin += 10; + } + + //this.zLevel = 0.0F; + //itemRender.zLevel = 0.0F; + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_DEPTH_TEST); + RenderHelper.enableStandardItemLighting(); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + } + } +} diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonWarp.class b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonWarp.class new file mode 100644 index 0000000..7d0a259 Binary files /dev/null and b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonWarp.class differ diff --git a/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonWarp.java b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonWarp.java new file mode 100644 index 0000000..7594662 --- /dev/null +++ b/src/main/java/jp/plusplus/fbs/gui/button/GuiButtonWarp.java @@ -0,0 +1,44 @@ +package jp.plusplus.fbs.gui.button; + +import jp.plusplus.fbs.FBS; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +/** + * Created by plusplus_F on 2015/10/22. + */ +public class GuiButtonWarp extends GuiButton { + public static final ResourceLocation rl = new ResourceLocation(FBS.MODID+":textures/gui/magicWarp.png"); + public boolean selected; + + public GuiButtonWarp(int id, int x, int y, String str) { + super(id, x, y, id<2?10:42, 15, str); + } + + @Override + public void drawButton(Minecraft par1Minecraft, int par2, int par3) { + if (this.visible) { + par1Minecraft.getTextureManager().bindTexture(rl); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + boolean onMouse = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height; + + int drawX = 176; + int drawY = (id<2?15*id:45*(id-2)+30); + + if(id<2){ + if (!this.enabled) drawX += width * 2; + else if (onMouse) drawX += width; + } + else{ + if (!this.enabled) drawY += height * 2; + else if (onMouse) drawY += height; + } + + //selected?0xffffff:0x404040 + this.drawTexturedModalRect(this.xPosition, this.yPosition, drawX, drawY, this.width, this.height); + drawCenteredString(par1Minecraft.fontRenderer, displayString, xPosition+width/2, yPosition+(this.height - 8) / 2, 0xffffff); + } + } +} -- cgit v1.2.3