mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-11-20 04:09:34 +00:00
07/03/201t
This commit is contained in:
1 parent
fa5621e00b
commit
a1b472d9ea
3 files changed
+26
-7
No files matched your search
+5
-4
@@ -33,7 +33,7 @@ public class GUIManual extends GUIScrollingBase {
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
loadPages();
|
||||
|
||||
}
|
||||
|
||||
public static final String GR_BACKGROUND = "BACKGROUND";
|
||||
@@ -43,15 +43,16 @@ public class GUIManual extends GUIScrollingBase {
|
||||
|
||||
@Override
|
||||
protected ComponentCollection assembleComponents() {
|
||||
loadPages();
|
||||
collection = new ComponentCollection(0, 0, xSize, ySize, this);
|
||||
|
||||
collection.addComponent(new ComponentTexturedRect(0, 0, 255, 255, ResourceHandler.getResource("textures/gui/manualTop.png"))).setGroup(GR_BACKGROUND);
|
||||
collection.addComponent(new ComponentTexturedRect(0, 255, 255, 69, ResourceHandler.getResource("textures/gui/manualBottom.png"))).setGroup(GR_BACKGROUND);
|
||||
|
||||
for (int i = 0; i < 35; i ++)
|
||||
for (int i = 0; i < pageList.size(); i++)
|
||||
{
|
||||
collection.addComponent(new ComponentIndexButton(20, 20 + i * 12, this)).setGroup(GR_INDEX);
|
||||
pageLength += 12;
|
||||
collection.addComponent(new ComponentIndexButton(20, 20 + i * 12, this, pageList.get(i))).setGroup(GR_INDEX);
|
||||
pageLength += 15;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ public class ManualPage {
|
||||
|
||||
public String getLocalizedName()
|
||||
{
|
||||
return (name.contains("item.") || name.contains("tile.")) ? StatCollector.translateToLocal(name) : name.contains("info.") ? name.substring(name.indexOf("info.") + 5) : "Invalid Name Data";
|
||||
return (name.contains("item.") || name.contains("tile.")) ? StatCollector.translateToLocal(name + ".name") : name.contains("info.") ? name.substring(name.indexOf("info.") + 5) : "Invalid Name Data";
|
||||
}
|
||||
|
||||
|
||||
|
||||
+20
-2
@@ -1,14 +1,28 @@
|
||||
package com.brandon3055.draconicevolution.client.gui.guicomponents;
|
||||
|
||||
import com.brandon3055.draconicevolution.client.gui.componentguis.ManualPage;
|
||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 7/03/2015.
|
||||
*/
|
||||
public class ComponentIndexButton extends ComponentScrollingBase {
|
||||
|
||||
public ComponentIndexButton(int x, int y, GUIScrollingBase gui) {
|
||||
private ManualPage page;
|
||||
private EntityItem item;
|
||||
|
||||
public ComponentIndexButton(int x, int y, GUIScrollingBase gui, ManualPage page) {
|
||||
super(x, y, gui);
|
||||
this.page = page;
|
||||
if (page.name.contains(".tile")) item = new EntityItem(Minecraft.getMinecraft().theWorld, 0, 0, 0, new ItemStack(GameData.getBlockRegistry().getObject(page.name.substring(page.name.indexOf(".") + 1).replace("draconicevolution", "DraconicEvolution"))));
|
||||
if (page.name.contains(".item")) item = new EntityItem(Minecraft.getMinecraft().theWorld, 0, 0, 0, new ItemStack(GameData.getItemRegistry().getObject(page.name.substring(page.name.indexOf(".") + 1).replace("draconicevolution", "DraconicEvolution"))));
|
||||
LogHelper.info(item + " " + GameData.getBlockRegistry().getObject("DraconicEvolution:draconiumOre") + " " + page.name.substring(page.name.indexOf(".") + 1).replace("draconicevolution", "DraconicEvolution") +
|
||||
" " + new ItemStack(GameData.getBlockRegistry().getObject(page.name.substring(page.name.indexOf(".") + 1).replace("draconicevolution", "DraconicEvolution"))));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -23,7 +37,7 @@ public class ComponentIndexButton extends ComponentScrollingBase {
|
||||
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return 12;
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -33,6 +47,10 @@ public class ComponentIndexButton extends ComponentScrollingBase {
|
||||
{
|
||||
fontRendererObj.drawString("!!!!!!!!!!! Test !!!!!!!!!! " + y/12, x, sy, 0xffffff);
|
||||
}
|
||||
if (item != null) {
|
||||
LogHelper.info("r");
|
||||
RenderManager.instance.renderEntityWithPosYaw(item, 0D, 0D, 0D, 0F, 0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user