Beispiel #1
0
 public static void setTab(WikiTab tab) {
   if (!isTabSelected(tab)) {
     gui.tab = tab;
     gui.mc
         .getSoundHandler()
         .playSound(
             PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
   }
 }
Beispiel #2
0
  /** Switches from the wiki gui to the library gui and vice versa * */
  public static void switchGui(IWikiMode mode, ArrayList<GuiExtension> list) {
    if (!selected.equals(mode)) {
      // If the previous mode was Save, then save it
      if (gui.mode.equals(SaveMode.getInstance())) {
        SaveMode.getInstance().markDirty();
      }

      // Otherwise switch the gui over to the new mode
      gui.setMode(mode);

      // Set the selected to this list
      selected = list;
    }
  }
Beispiel #3
0
 public static void setMod(WikiMod mod) {
   gui.mod = mod;
 }
Beispiel #4
0
 public static void setPage(WikiPage page) {
   gui.setPage(page);
 }
Beispiel #5
0
 public static void loadPage(String mod, String tab, String cat, String page) {
   gui.loadPage(mod, tab, cat, page);
 }
Beispiel #6
0
 public static void drawTexture(int x, int y, int xStart, int yStart, int xEnd, int yEnd) {
   gui.drawTexturedModalRect(x, y, xStart, yStart, xEnd, yEnd);
 }
Beispiel #7
0
 public static void updateMouse() {
   mouseX =
       ((Mouse.getEventX() * gui.width / gui.mc.displayWidth) * gui.resolution.getScaleFactor())
           - gui.getLeft();
   mouseY = ((gui.mc.displayHeight - Mouse.getEventY())) - gui.getTop(1.0F, 0);
 }
Beispiel #8
0
 public static void drawScaledSplitText(
     float scale, String text, int x, int y, int color, int length) {
   gui.drawScaledSplitText(gui.mc, scale, text, x, y, color, length);
 }
Beispiel #9
0
 public static void drawScaledText(float scale, String text, int x, int y, int color) {
   gui.drawScaledText(gui.mc, scale, text, x, y, color);
 }
Beispiel #10
0
 public static void verticalGradient(int x, int y, int x2, int y2, int from, int to) {
   gui.verticalGradient(theLeft + x, theTop + y, theLeft + x2, theTop + y2, from, to);
 }
Beispiel #11
0
 public static void horizontalGradient(int x, int y, int x2, int y2, int from, int to) {
   gui.horizontalGradient(theLeft + x, theTop + y, theLeft + x2, theTop + y2, from, to);
 }
Beispiel #12
0
 public static void drawRect(int x, int y, int x2, int y2, int color) {
   gui.drawRect(theLeft + x, theTop + y, theLeft + x2, theTop + y2, color);
 }