fileSelectScreen = new FileSelectScreen(display);
fileSelectScreen.setListener(this);
}
// ---------------------------------------------------------------
newGameBoardSize = new ChoiceGroup(T._("Board Size"), Choice.POPUP, boardSizeList, null);
newGameBoardSize.setSelectedIndex(0, true);
newGameCustomBoardSize = new TextField(T._("Custom Value"), null, 2, TextField.NUMERIC);
newGameHandicap = new TextField(T._("Handicap"), "0", 1, TextField.NUMERIC);
newGameKomi = new TextField(T._("Komi"), "5.5", 8, TextField.DECIMAL);
newGameRuleSet = new ChoiceGroup(T._("Rule Set"), Choice.POPUP, ruleSetList, null);
newGameRuleSet.setSelectedIndex(0, true);
newGameTimeSystem = new ChoiceGroup(T._("Time System"), Choice.POPUP, timeSystemList, null);
newGameTimeSystem.setSelectedIndex(0, true);
newGameMainTime = new TextField(T._("Main Time"), "180", 5, TextField.NUMERIC);
newGameByoYomiTime = new TextField(T._("Byo-Yomi Time"), "30", 5, TextField.NUMERIC);
newGameByoYomiAttr = new TextField(T._("Byo-Yomi Attr"), "5", 5, TextField.NUMERIC);
newGameWhitePlayerName = new TextField(T._("White"), T._("White"), 32, TextField.ANY);
newGameBlackPlayerName = new TextField(T._("Black"), T._("Black"), 32, TextField.ANY);
newGameForm = new Form(T._("New game"));
newGameForm.setCommandListener(this);
newGameForm.addCommand(startCommand);
newGameForm.addCommand(backCommand);
newGameForm.append(newGameRuleSet);
newGameForm.append(newGameBoardSize);
newGameForm.append(newGameCustomBoardSize);
newGameForm.append(newGameHandicap);
newGameForm.append(newGameKomi);
newGameForm.append(newGameTimeSystem);
newGameForm.append(newGameMainTime);
newGameForm.append(newGameByoYomiTime);
newGameForm.append(newGameByoYomiAttr);
newGameForm.append(newGameWhitePlayerName);
newGameForm.append(newGameBlackPlayerName);
// ---------------------------------------------------------------
optPlayForm = new Form(T._("Play mode"));
optPlayForm.setCommandListener(this);
optPlayForm.addCommand(backCommand);
optPlaySwitches = new ChoiceGroup(T._("On board"), Choice.MULTIPLE, playOptList, null);
optPlaySwitches.setSelectedIndex(PLAY_OPT_MOVE_STATUS, true); // default show move status
optPlayCommentLines = new TextField(T._("Comment lines"), "0", 1, TextField.NUMERIC);
optPlayForm.append(optPlaySwitches);
optPlayForm.append(optPlayCommentLines);
optProbForm = new Form(T._("Problem mode"));
optProbForm.setCommandListener(this);
optProbForm.addCommand(backCommand);
optProbSwitches = new ChoiceGroup(T._("On board"), Choice.MULTIPLE, probOptList, null);
optProbSwitches.setSelectedIndex(PROB_OPT_COLOR_TO_PLAY, true);
optProbSwitches.setSelectedIndex(PROB_OPT_SOLVED_FAILED, true);
optProbCommentLines = new TextField(T._("Comment lines"), "1", 1, TextField.NUMERIC);
optProbForm.append(optProbSwitches);
optProbForm.append(optProbCommentLines);
optGenForm = new Form(T._("General"));
optGenForm.setCommandListener(this);
optGenForm.addCommand(backCommand);
optGenSwitches = new ChoiceGroup(null, Choice.MULTIPLE, genOptList, null);
optGenSwitches.setSelectedIndex(GEN_OPT_SOUND, true);
optCommentFontSize = new TextField(T._("Comment font size"), "14", 2, TextField.NUMERIC);
optGenForm.append(optGenSwitches);
optGenForm.append(optCommentFontSize);
optForm = new List(T._("Options"), Choice.IMPLICIT, optGroupList, null);
optForm.setCommandListener(this);
optForm.addCommand(backCommand);
optForm.addCommand(selectCommand);
// -- In-game submenus -------------------------------------------
igProblemMenuList = new List(T._("Problem"), Choice.IMPLICIT, igProblemMenuItems, null);
igProblemMenuList.setCommandListener(this);
igProblemMenuList.addCommand(backCommand);
igPlayMenuList = new List(T._("Play"), Choice.IMPLICIT, igPlayMenuItems, null);
igPlayMenuList.setCommandListener(this);
igPlayMenuList.addCommand(backCommand);
igViewMenuList = new List(T._("View"), Choice.IMPLICIT, igViewMenuItems, null);
igViewMenuList.setCommandListener(this);
igViewMenuList.addCommand(backCommand);
igScoreMenuList = new List(T._("Score"), Choice.IMPLICIT, igScoreMenuItems, null);
igScoreMenuList.setCommandListener(this);
igScoreMenuList.addCommand(backCommand);
// -- Problem filter ---------------------------------------------
probFilterForm = new Form(T._("Problem filter"));
probFilterForm.setCommandListener(this);
if (fileSelectScreen != null)
probFilterForm.addCommand(updPathsCommand);
probFilterForm.addCommand(startCommand);
probFilterForm.addCommand(backCommand);
probFilterGenre = new ChoiceGroup(T._("Genre"), Choice.POPUP);
//probFilterGenre.setSelectedIndex(0, true);
probFilterDiffFrom = new ChoiceGroup(T._("Difficulty From"), Choice.POPUP, levelList, null);
probFilterDiffFrom.setSelectedIndex(0, true);
probFilterDiffTo = new ChoiceGroup(T._("Difficulty To"), ChoiceGroup.POPUP, levelList, null);
probFilterDiffTo.setSelectedIndex(0, true);
probFilterDiffTo.setSelectedIndex(levelList.length - 1, true);
probFilterSortByGenre = new ChoiceGroup(T._("Sort By Genre"), ChoiceGroup.POPUP, sortList, null);
probFilterSortByGenre.setSelectedIndex(0, true);
probFilterSortByDifficulty = new ChoiceGroup(T._("Sort By Difficulty"), ChoiceGroup.POPUP, sortList, null);
probFilterSortByDifficulty.setSelectedIndex(0, true);
probFilterSortByPopularity = new ChoiceGroup(T._("Sort By Popularity"), ChoiceGroup.POPUP, sortList, null);
probFilterSortByPopularity.setSelectedIndex(0, true);
probFilterShow = new ChoiceGroup(T._("Show"), ChoiceGroup.MULTIPLE, showList, null);
probFilterShow.setSelectedIndex(0, true);
probFilterShow.setSelectedIndex(2, true);
probFilterShow.setSelectedIndex(3, true);
probFilterPath = new ChoiceGroup(T._("Path"), ChoiceGroup.MULTIPLE);
probFilterForm.append(probFilterGenre);
probFilterForm.append(probFilterDiffFrom);
probFilterForm.append(probFilterDiffTo);
probFilterForm.append(probFilterShow);