mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 12:19:46 +00:00
Some Lexicon GUI tweaks, both visual and functional.
This commit is contained in:
1 parent
82f591267a
commit
201f1d0401
4 files changed
+8
-4
No files matched your search
@@ -28,6 +28,8 @@ import vazkii.botania.common.item.ModItems;
|
||||
|
||||
public class GuiLexicon extends GuiScreen {
|
||||
|
||||
public static GuiLexicon currentOpenLexicon = new GuiLexicon();
|
||||
|
||||
public static final ResourceLocation texture = new ResourceLocation(LibResources.GUI_LEXICON);
|
||||
|
||||
int guiWidth = 146;
|
||||
@@ -37,6 +39,8 @@ public class GuiLexicon extends GuiScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
currentOpenLexicon = this;
|
||||
|
||||
left = width / 2 - guiWidth / 2;
|
||||
top = height / 2 - guiHeight / 2;
|
||||
|
||||
@@ -98,7 +102,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
GuiButtonInvisible button = (GuiButtonInvisible) buttonList.get(i);
|
||||
LexiconCategory category = i_ >= categoryList.size() ? null : categoryList.get(i_);
|
||||
if(category != null)
|
||||
button.displayString = " " + StatCollector.translateToLocal(category.getUnlocalizedName());
|
||||
button.displayString = StatCollector.translateToLocal(category.getUnlocalizedName());
|
||||
else button.displayString = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class GuiLexiconIndex extends GuiLexicon {
|
||||
GuiButtonInvisible button = (GuiButtonInvisible) buttonList.get(i);
|
||||
LexiconEntry entry = i >= entryList.size() ? null : entryList.get(i);
|
||||
if(entry != null)
|
||||
button.displayString = " " + StatCollector.translateToLocal(entry.getUnlocalizedName());
|
||||
button.displayString = StatCollector.translateToLocal(entry.getUnlocalizedName());
|
||||
else button.displayString = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class GuiButtonInvisible extends GuiButton {
|
||||
|
||||
boolean unicode = par1Minecraft.fontRenderer.getUnicodeFlag();
|
||||
par1Minecraft.fontRenderer.setUnicodeFlag(true);
|
||||
par1Minecraft.fontRenderer.drawString((k == 2 ? EnumChatFormatting.BOLD : "") + displayString, xPosition/* + (k == 2 ? 5 : 0)*/, yPosition + (height - 8) / 2, 0);
|
||||
par1Minecraft.fontRenderer.drawString(displayString, xPosition + (k == 2 ? 5 : 0), yPosition + (height - 8) / 2, 0);
|
||||
par1Minecraft.fontRenderer.setUnicodeFlag(unicode);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public class GuiHandler implements IGuiHandler {
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
switch(ID) {
|
||||
case LibGuiIDs.LEXICON :
|
||||
return new GuiLexicon();
|
||||
return GuiLexicon.currentOpenLexicon;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user