Closes #402,#404,406
This commit is contained in:
parent
96464980c2
commit
8fba82312c
16 changed files with 149 additions and 163 deletions
|
@ -1,7 +1,5 @@
|
|||
package techreborn.manual;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
@ -10,22 +8,15 @@ import net.minecraft.inventory.Container;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.items.ItemParts;
|
||||
import techreborn.items.ItemPlates;
|
||||
import techreborn.manual.pages.AdvancedMachines;
|
||||
import techreborn.manual.pages.BasicMachinesPage;
|
||||
import techreborn.manual.pages.ContentsPage;
|
||||
import techreborn.manual.pages.CraftingInfoPage;
|
||||
import techreborn.manual.pages.DescriptionPage;
|
||||
import techreborn.manual.pages.GeneratingPowerPage;
|
||||
import techreborn.manual.pages.GettingStartedPage;
|
||||
import techreborn.manual.pages.ToolsPage;
|
||||
import techreborn.manual.pages.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiManual extends GuiScreen
|
||||
|
@ -40,7 +31,7 @@ public class GuiManual extends GuiScreen
|
|||
|
||||
public GuiManual()
|
||||
{
|
||||
this.xSize = 146;
|
||||
this.xSize = 200;
|
||||
this.ySize = 180;
|
||||
root = createRoot();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package techreborn.manual.pages;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
@ -10,12 +8,14 @@ import net.minecraft.util.text.translation.I18n;
|
|||
import techreborn.manual.PageCollection;
|
||||
import techreborn.manual.Reference;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class BasePage extends GuiScreen
|
||||
{
|
||||
|
||||
public static final ResourceLocation PAGE_TEXTURE = new ResourceLocation(
|
||||
"techreborn:textures/manual/gui/manual.png");
|
||||
private final int xSize = 146;
|
||||
private final int xSize = 200;
|
||||
private final int ySize = 180;
|
||||
// Name Displayed in the index page
|
||||
public String INDEX_NAME;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package techreborn.manual.pages;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,6 +10,8 @@ import techreborn.manual.PageCollection;
|
|||
import techreborn.manual.Reference;
|
||||
import techreborn.manual.util.GuiButtonItemTexture;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class ContentsPage extends TitledPage
|
||||
{
|
||||
public ContentsPage(String name, PageCollection collection)
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
package techreborn.manual.pages;
|
||||
|
||||
import java.awt.*;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
@ -14,26 +11,22 @@ import net.minecraft.client.renderer.RenderHelper;
|
|||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.ShapedRecipes;
|
||||
import net.minecraft.item.crafting.ShapelessRecipes;
|
||||
import net.minecraft.item.crafting.*;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import techreborn.manual.PageCollection;
|
||||
import techreborn.manual.util.ButtonUtil;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.awt.*;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class CraftingInfoPage extends TitledPage
|
||||
{
|
||||
|
@ -82,7 +75,7 @@ public class CraftingInfoPage extends TitledPage
|
|||
{
|
||||
if (hasRecipe)
|
||||
{
|
||||
renderImage(offsetX, offsetY + 10, "craftingtable");
|
||||
renderImage(offsetX + (offsetX/ 2) , offsetY + 10, "craftingtable");
|
||||
} else
|
||||
{
|
||||
drawString(fontRendererObj, "No Crafting Recipe", offsetX + 40, offsetY + 22, Color.black.getRGB());
|
||||
|
@ -149,7 +142,7 @@ public class CraftingInfoPage extends TitledPage
|
|||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(offsetX, offsetY - 14, 0, 0, 140, this.height);
|
||||
drawTexturedModalRect(offsetX + 16, offsetY + 9, 0, 0, 116, 54);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
package techreborn.manual.util;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.client.config.GuiButtonExt;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class GuiButtonItemTexture extends GuiButtonExt
|
||||
{
|
||||
|
||||
|
@ -39,13 +38,13 @@ public class GuiButtonItemTexture extends GuiButtonExt
|
|||
mc.getTextureManager().bindTexture(buttonTextures);
|
||||
int u = textureU;
|
||||
int v = textureV;
|
||||
|
||||
if (flag)
|
||||
{
|
||||
u += width;
|
||||
u += mc.fontRendererObj.getStringWidth(this.NAME) + 25;
|
||||
v += mc.fontRendererObj.getStringWidth(this.NAME) + 25;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(0f, 0f, 0f, 1f);
|
||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, u, v, width, height);
|
||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, u, v, mc.fontRendererObj.getStringWidth(this.NAME) + 25, height);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue