Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package cz.ascaria.zoneofuprising.gui;
- import com.jme3.input.event.MouseButtonEvent;
- import com.jme3.math.Vector2f;
- import cz.ascaria.zoneofuprising.Main;
- import java.util.concurrent.TimeUnit;
- import tonegod.gui.controls.buttons.ButtonAdapter;
- import tonegod.gui.controls.windows.Window;
- import tonegod.gui.core.Screen;
- /**
- *
- * @author Ascaria Quynn
- */
- public class SettingsLayout extends BaseLayout {
- public Window[] getLayout() {
- checkScreen();
- // Create window
- Window win = new Window(screen, new Vector2f(15f, 15f), new Vector2f(300f, 400f));
- win.setWindowIsMovable(false);
- win.setIsResizable(false);
- win.setGlobalAlpha(0.9f);
- win.setWindowTitle("Zone of Uprising Settings");
- screen.addElement(win);
- win.centerToParent();
- // Back button
- ButtonAdapter back = new ButtonAdapter(screen, new Vector2f(15f, 50f)) {
- @Override
- public void onButtonMouseLeftUp(MouseButtonEvent evt, boolean toggled) {
- guiManager.show(MainMenuLayout.class);
- }
- };
- back.setText("Back");
- win.addChild(back);
- return new Window[] { win };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment