Start on the new manual

This commit is contained in:
gigabit101 2016-02-25 18:25:52 +00:00
parent 7d6c982847
commit 82d2de7eb1
30 changed files with 423 additions and 81 deletions

View file

@ -0,0 +1,22 @@
package techreborn.manual.pages;
import net.minecraft.client.Minecraft;
import techreborn.manual.PageCollection;
public class TitledPage extends BasePage {
private String title;
public boolean drawTitle = true;
private int colour;
public TitledPage(String name, boolean showInMenue, PageCollection collection, String unlocalizedTitle, int colour) {
super(name, showInMenue, collection);
this.title = unlocalizedTitle;
this.colour = colour;
}
@Override
public void renderOverlayComponents(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
if (title == null) title = INDEX_NAME;
if (drawTitle) drawCenteredString(minecraft.fontRendererObj, ttl(title), offsetX + 70, offsetY + 10, colour);
}
}