示例#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));
   }
 }
示例#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;
    }
  }
示例#3
0
 public static void setMod(WikiMod mod) {
   gui.mod = mod;
 }
示例#4
0
 public static void setPage(WikiPage page) {
   gui.setPage(page);
 }
示例#5
0
 public static void loadPage(String mod, String tab, String cat, String page) {
   gui.loadPage(mod, tab, cat, page);
 }
示例#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);
 }
示例#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);
 }
示例#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);
 }
示例#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);
 }
示例#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);
 }
示例#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);
 }
示例#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);
 }