/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package bs; import bswfx.BomberStudent; import bswfx.ScreenManager; /** * * @author loquicom */ public class Menu { public static final int CREATE = 0; public static final int JOIN = 1; public static final int QUIT = 2; protected int selected = 0; public Menu(){ ScreenManager.setScreen(ScreenManager.MENU_SCREEN); } public int getAction(){ return this.selected; } public void up(){ if(this.selected == 0){ this.selected = 3; } this.selected--; } public void down(){ if(this.selected == 2){ this.selected = -1; } this.selected++; } public String toHtml(){ String html = ""; html += ""; html += ""; html += ""; html += ""; html = html.replaceAll("id" + this.selected, "select"); return html; } public void show(){ BomberStudent.wfx.loadHtml(this.toHtml()); } }