示例#1
0
 public static void update() {
   if (update) {
     Sound.random("random", 1f, "OGG", "res/sound/music", 11);
     GUI.Background.draw("dirt");
     Text.draw("SETTINGS", GUI.Coordinates.x / 2 - 94, GUI.Coordinates.y / 4 * 3, 6, Color.white);
     GUI.Button.draw(
         "Music",
         GUIScale.toUpperCase(),
         GUI.Coordinates.x / 2 - 94,
         GUI.Coordinates.y / 2,
         1,
         1,
         "planks_oak",
         2,
         128);
     if (Button.isButtonClicked("Music")) {
       if (GUIScale.length() == 6) {
         GUIScale = "Auto";
         Create.createFile("Settings/GUIScale");
         Create.write("Auto");
         Create.closeFile();
       } else {
         GUIScale = "Normal";
         Create.createFile("Settings/GUIScale");
         Create.write("Normal");
         Create.closeFile();
         game.Main.Sleep(256);
       }
     }
   }
 }
示例#2
0
文件: Play.java 项目: MJKAEM/Falpha1
 public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException {
   g.translate(Main.getWidth() / 2, Main.getHeight() / 2);
   l.get(0).show(g);
   p.show(g);
   p.displayChat(g);
 }