private static void buildStatusMenu() { m_current = new menu("status", null); addItem(new menu_item(pda_player.tex_icon_status, world.levels[world.i_currentLvl].char_living[player_tag].name + "'s status", "title"), 0); addItem(new menu_item(pda_player.tex_icon_status, "Health: " + ((int)world.levels[world.i_currentLvl].char_living[player_tag].attrib.hp_current).ToString() + "%", "title"), 0); addItem(new menu_item(pda_player.tex_icon_status, "Hunger: " + ((int)(world.levels[world.i_currentLvl].char_living[player_tag].attrib.hun_current * 100)).ToString() + "%", "title"), 0); //addItem(new menu_item(pda_player.tex_icon_status, //"Mechanical skill: " + ((int)world.levels[world.i_currentLvl].char_living[player_tag].attrib.mech_max).ToString(), //"title"), 0); //addItem(new menu_item(pda_player.tex_icon_status, //"Medical skill: " + ((int)world.levels[world.i_currentLvl].char_living[player_tag].attrib.med_max).ToString(), //"title"), 0); addItem(new menu_item(pda_player.tex_icon_status, "Stealth skill: " + ((int)world.levels[world.i_currentLvl].char_living[player_tag].attrib.stl_max).ToString(), "title"), 0); addItem(new menu_item(pda_player.tex_icon_status, "Strength: " + ((int)world.levels[world.i_currentLvl].char_living[player_tag].attrib.str_max).ToString(), "title"), 0); addItem(new menu_item(pda_player.tex_icon_status, "Stamina: " + ((int)world.levels[world.i_currentLvl].char_living[player_tag].attrib.sta_current).ToString(), "title"), 0); addItem(new menu_item(pda_player.tex_icon_status, "Encumbrance: " + (world.levels[world.i_currentLvl].char_living[player_tag].Inventory.CurWeight).ToString() + "/" + ((int)world.levels[world.i_currentLvl].char_living[player_tag].Inventory.maxWeight).ToString(), "title"), 0); addItem(new menu_item(pda_player.tex_icon_status, "Kills: " + (world.levels[world.i_currentLvl].char_living[player_tag].attrib.kills).ToString(), "title"), 0); showMenu = true; translationDone = false; show = true; }
private static menu buildMainMenu() { m_current = new menu("MainMenu", null); addItem(new menu_item(pda_player.tex_icon_inventory, "Inventory", "btn_inven"), 0); addItem(new menu_item(pda_player.tex_icon_status, "Status", "btn_status"), 0); //addItem(new menu_item(pda_player.tex_icon_map, "Map", "btn_map"), 0); return m_current; }
private static menu buildInventory(inventory inventory) { inven = inventory; menu old = m_current; m_current = new menu("inventory", null); try { for (int i = 0; i != inven.items.Length; i++) { addItem(new menu_item(inven.items[i].icon, inven.items[i].name, inven.items[i].gameTag), i); m_current.items[i].selected = false; } } catch { addItem(new menu_item(pda_player.tex_icon_inventory, "Empty", "none"), -1); } if (inven.items.Length == 0) { addItem(new menu_item(pda_player.tex_icon_inventory, "Empty", "none"), -1); } menu output = m_current; //m_current = old; showMenu = true; translationDone = false; show = true; return output; }
private static menu buildItemMenu(int item) { menu old = m_current; m_current = new menu("item", null); addItem(new menu_item(inven.items[item].icon, inven.items[item].name, inven.items[item].gameTag), item); if (inven.items[item].type != itemType.junk) { addItem(new menu_item(pda_player.tex_icon_equip, "Equip", "btn_equip"), 0); m_current.items[0].type = inven.items[item].type; } addItem(new menu_item(pda_player.tex_icon_drop, "Drop", "btn_drop"), 0); addItem(new menu_item(pda_player.tex_icon_examine, "Examine", "btn_examine"), 0); menu output = m_current; //m_current = old; showMenu = true; translationDone = false; show = true; return output; }
private static void buildExamineMenu() { int itemID = m_current.items[0].myTag; m_current = new menu("examine", null); addItem(new menu_item(inven.items[itemID].icon, inven.items[itemID].name, inven.items[itemID].gameTag), itemID); if (inven.items[itemID].type != itemType.ammo) { addItem(new menu_item(inven.items[itemID].icon, "Quality: " + inven.items[itemID].quality.ToString(), "btn_quality"), 0); } else { addItem(new menu_item(inven.items[itemID].icon, "Quanity: " + inven.items[itemID].quality.ToString(), "btn_quality"), 0); } //char[] seperators = { \n }; //inven.items[itemID].description = Convert.ToString(inven.items[itemID].description.Split(seperators)); addItem(new menu_item(inven.items[itemID].icon, "Weight: " + inven.items[itemID].weight.ToString() + "Kg", "btn_weight"), 0); addItem(new menu_item(inven.items[itemID].icon, inven.items[itemID].description, "btn_description"), 0); }