Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2014
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.32 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package cz.ascaria.zoneofuprising.gui;
  6.  
  7. import com.jme3.input.event.MouseButtonEvent;
  8. import com.jme3.math.Vector2f;
  9. import cz.ascaria.zoneofuprising.Main;
  10. import java.util.concurrent.TimeUnit;
  11. import tonegod.gui.controls.buttons.ButtonAdapter;
  12. import tonegod.gui.controls.windows.Window;
  13. import tonegod.gui.core.Screen;
  14.  
  15. /**
  16.  *
  17.  * @author Ascaria Quynn
  18.  */
  19. public class SettingsLayout extends BaseLayout {
  20.  
  21.     public Window[] getLayout() {
  22.         checkScreen();
  23.  
  24.         // Create window
  25.         Window win = new Window(screen, new Vector2f(15f, 15f), new Vector2f(300f, 400f));
  26.         win.setWindowIsMovable(false);
  27.         win.setIsResizable(false);
  28.         win.setGlobalAlpha(0.9f);
  29.         win.setWindowTitle("Zone of Uprising Settings");
  30.         screen.addElement(win);
  31.         win.centerToParent();
  32.  
  33.         // Back button
  34.         ButtonAdapter back = new ButtonAdapter(screen, new Vector2f(15f, 50f)) {
  35.             @Override
  36.             public void onButtonMouseLeftUp(MouseButtonEvent evt, boolean toggled) {
  37.                 guiManager.show(MainMenuLayout.class);
  38.             }
  39.         };
  40.         back.setText("Back");
  41.         win.addChild(back);
  42.  
  43.         return new Window[] { win };
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement