Advertisement
ViiRuS

Sliders!

Apr 4th, 2012
848
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. Put all three files in the jar
  2.  
  3. Gui File
  4. ----------------------------------
  5.     private static TestEnumOptions relevantOptions[];
  6.     private TestGameSettings options;
  7.  
  8.     public GuiWhatever(TestGameSettings settings)
  9.     {
  10.         options = settings;
  11.     }
  12.  
  13.  
  14. TestEnumOptions aoptions[] = relevantOptions;
  15.             int len = aoptions.length;
  16.             for (int l = 0; l < len; l++)
  17.             {
  18.                 TestEnumOptions option = aoptions[l];
  19.                 controlList.add(new TestGuiSlider(option.returnEnumOrdinal(), width / 2 - 100, height / 2 - 8, option, options.getKeyBinding(option), options.getOptionFloatValue(option), options));
  20.             }
  21.  
  22. static
  23.     {
  24.         relevantOptions = (new TestEnumOptions[]
  25.                 {
  26.                 TestEnumOptions.Test
  27.                 });
  28.     }
  29.  
  30.  
  31. ----------------------
  32. Where you open the gui
  33. ----------------------
  34.  
  35.             EntityPlayer player = ModLoader.getMinecraftInstance().thePlayer;
  36.             TestGameSettings set = new TestGameSettings(ModLoader.getMinecraftInstance());
  37.             ModLoader.openGUI(player, new GuiWhatever(set));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement