/** Renders the Config Menu */ void renderConfig() { float rowSpace = 1.5f; float row = 0f; // Botonera principal int i = 0; if (GUI.Button(new Rect(margin + i++ *buttonWidth, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("accept"), styleButton)) { currentState = STATE_EDITING; } GUI.Box(new Rect(margin + i * buttonWidth, margin + buttonHeight * row, Screen.width - (2 * margin + i++ *buttonWidth), margin + buttonHeight), I18N.getValue("set_title"), styleButton); // Nueva fila row += rowSpace; // ========================================= FLOWERS! ======================================= i = 0; GUI.Box(new Rect(margin + i * buttonWidth, margin + buttonHeight * row, Screen.width - (2 * margin + i++ *buttonWidth), margin + buttonHeight * (rowSpace * 2)), I18N.getValue("set_flowers") + I18N.getValue("wildcard")); // Nueva fila row += rowSpace; // Configuracion de flores en esquina i = 1; GUI.Label(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("avenue")); config_flower_av = GUI.TextField(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth / 2, margin + buttonHeight), config_flower_av); i++; GUI.Label(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("street")); config_flower_st = GUI.TextField(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth / 2, margin + buttonHeight), config_flower_st); i++; GUI.Label(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("count")); config_flower_no = GUI.TextField(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth / 2, margin + buttonHeight), config_flower_no); i++; if (GUI.Button(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("set"))) { Corner.setCorner(config_flower_av, config_flower_st, config_flower_no, false); } // Nueva fila row += rowSpace; row += rowSpace; // ========================================= PAPERS! ======================================= i = 0; GUI.Box(new Rect(margin + i * buttonWidth, margin + buttonHeight * row, Screen.width - (2 * margin + i++ *buttonWidth), margin + buttonHeight * (rowSpace * 2)), I18N.getValue("set_papers") + I18N.getValue("wildcard")); // Nueva fila row += rowSpace; // Configuracion de papeles en esquina i = 1; GUI.Label(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("avenue")); config_paper_av = GUI.TextField(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth / 2, margin + buttonHeight), config_paper_av); i++; GUI.Label(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("street")); config_paper_st = GUI.TextField(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth / 2, margin + buttonHeight), config_paper_st); i++; GUI.Label(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("count")); config_paper_no = GUI.TextField(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth / 2, margin + buttonHeight), config_paper_no); i++; if (GUI.Button(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("set"))) { Corner.setCorner(config_paper_av, config_paper_st, config_paper_no, true); } // Nueva fila row += rowSpace; row += rowSpace; // ========================================= BAG! ======================================= i = 0; GUI.Box(new Rect(margin + i * buttonWidth, margin + buttonHeight * row, Screen.width - (2 * margin + i++ *buttonWidth), margin + buttonHeight * (rowSpace * 2)), I18N.getValue("inthebag")); // Nueva fila row += rowSpace; // Configuracion de papeles en esquina i = 1; GUI.Label(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("flowers_bag")); config_bag_flowers = GUI.TextField(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth / 2, margin + buttonHeight), config_bag_flowers); i++; GUI.Label(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("papers_bag")); config_bag_papers = GUI.TextField(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth / 2, margin + buttonHeight), config_bag_papers); i++; i++; i++; i++; if (GUI.Button(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("set"))) { Init.getRobotBehaviour().flores = int.Parse(config_bag_flowers); Init.getRobotBehaviour().papeles = int.Parse(config_bag_papers); } // Nueva fila row += rowSpace; row += rowSpace; // ========================================= LANGUAGE! ======================================= i = 0; GUI.Box(new Rect(margin + i * buttonWidth, margin + buttonHeight * row, Screen.width - (2 * margin + i++ *buttonWidth), margin + buttonHeight * (rowSpace * 2)), I18N.getValue("language")); // Nueva fila row += rowSpace; // Configuracion de idioma i = 1; GUI.Label(new Rect(margin + i++ *buttonWidth / 2, margin + buttonHeight * row, buttonWidth * 2, margin + buttonHeight), I18N.getValue("lang_selected")); langSelected = GUI.TextField(new Rect(margin + i++ *buttonWidth, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), langSelected); i++; if (GUI.Button(new Rect(margin + i++ *buttonWidth, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("lang_en"))) { langSelected = I18N.getValue("lang_en"); I18N.setLang("en_US"); } if (GUI.Button(new Rect(margin + i++ *buttonWidth, margin + buttonHeight * row, buttonWidth, margin + buttonHeight), I18N.getValue("lang_es"))) { langSelected = I18N.getValue("lang_es"); I18N.setLang("es_AR"); } }