Fix up Windows game/PCed menus
- Journal added - Move Reunite and Own Vehicles to end to match Mac ordering - Fix seeing instant help for creating a PC when you already have 6 PCs - Fix listing wrong spells in spell menus - Fix indentation - Disable PC editor edit menus when file not loaded
This commit is contained in:
@@ -62,6 +62,7 @@ BEGIN
|
||||
MENUITEM "See Talking Notes", IDM_OPTIONS_TALKING
|
||||
MENUITEM "See Encounter Notes", IDM_OPTIONS_ENCOUNTER
|
||||
MENUITEM "See Overall Party Stats", IDM_OPTIONS_STATS
|
||||
MENUITEM "See Journal", IDM_OPTIONS_JOURNAL
|
||||
END
|
||||
POPUP "&Actions"
|
||||
BEGIN
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#define IDM_HELP_SPELLS 141
|
||||
#define IDM_HELP_ABOUT 142
|
||||
#define IDM_HELP_TOWN 143
|
||||
#define IDM_OPTIONS_JOURNAL 144
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
@@ -83,14 +83,14 @@ BEGIN
|
||||
MENUITEM "Raise Dead, Destone, etc.", IDM_PARTY_DEAD
|
||||
MENUITEM "Remove Bad Conditions", IDM_PARTY_CONDITIONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Reunite Party", IDM_PARTY_REUNITE
|
||||
MENUITEM "Own All Boats/Horses", IDM_PARTY_VEHICLES
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Edit Mage Spells", IDM_PARTY_MAGE
|
||||
MENUITEM "Edit Priest Spells", IDM_PARTY_PRIEST
|
||||
MENUITEM "Edit Traits", IDM_PARTY_TRAITS
|
||||
MENUITEM "Edit Skills", IDM_PARTY_SKILLS
|
||||
MENUITEM "Edit XP", IDM_PARTY_XP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Reunite Party", IDM_PARTY_REUNITE
|
||||
MENUITEM "Own All Boats/Horses", IDM_PARTY_VEHICLES
|
||||
END
|
||||
POPUP "&Scenario Editing"
|
||||
BEGIN
|
||||
|
@@ -543,6 +543,7 @@ void handle_menu_choice(eMenu item_hit) {
|
||||
if(i == 6) {
|
||||
ASB("Add PC: You already have 6 PCs.");
|
||||
print_buf();
|
||||
break;
|
||||
}
|
||||
if(univ.town.num == univ.scenario.which_town_start) {
|
||||
give_help(56,0);
|
||||
|
@@ -208,7 +208,7 @@ void adjust_spell_menus() {
|
||||
for(i = 0; i < 62; i++)
|
||||
if(on_spell_menu[0][i] >= 0) {
|
||||
eSpell spell = cSpell::fromNum(eSkill::MAGE_SPELLS, on_spell_menu[0][i]);
|
||||
std::string name = get_str("magic-names", i + 1);
|
||||
std::string name = (*spell).name();
|
||||
if((*spell).cost >= 0)
|
||||
sprintf(spell_name," L%d - %s, C %d",(*spell).level, name.c_str(), (*spell).cost);
|
||||
else sprintf(spell_name," L%d - %s, C ?",(*spell).level, name.c_str());
|
||||
@@ -242,7 +242,7 @@ void adjust_spell_menus() {
|
||||
for(i = 0; i < 62; i++)
|
||||
if(on_spell_menu[1][i] >= 0) {
|
||||
eSpell spell = cSpell::fromNum(eSkill::MAGE_SPELLS, on_spell_menu[1][i]);
|
||||
std::string name = get_str("magic-names", i + 101);
|
||||
std::string name = (*spell).name();
|
||||
if((*spell).cost >= 0)
|
||||
sprintf(spell_name," L%d - %s, C %d",(*spell).level, name.c_str(), (*spell).cost);
|
||||
else sprintf(spell_name," L%d - %s, C ?",(*spell).level, name.c_str());
|
||||
|
@@ -14,6 +14,7 @@
|
||||
// Fortunately they're on symbols not used in this file, so this should work.
|
||||
#include <Windows.h>
|
||||
#include <gl/GL.h>
|
||||
#undef HELP_INDEX // Except this one
|
||||
|
||||
// This is the index of each menu on the menubar
|
||||
enum {
|
||||
@@ -111,6 +112,10 @@ void init_menubar() {
|
||||
i = 0;
|
||||
for(eMenu opt : help_choices)
|
||||
setMenuCommand(help_menu, i++, opt);
|
||||
|
||||
menuChoices[IDM_MAGE_ABOUT] = eMenu::ABOUT_MAGE;
|
||||
menuChoices[IDM_PRIEST_ABOUT] = eMenu::ABOUT_PRIEST;
|
||||
menuChoices[IDM_MONSTERS_ABOUT] = eMenu::ABOUT_MONSTERS;
|
||||
}
|
||||
|
||||
void adjust_monst_menu() {
|
||||
@@ -172,26 +177,26 @@ void adjust_spell_menus() {
|
||||
on_spell_menu[0][i] = -1;
|
||||
}
|
||||
for(i = 0; i < 62; i++)
|
||||
if(pc_can_cast_spell(current_pc, cSpell::fromNum(eSkill::MAGE_SPELLS, i))) {
|
||||
on_spell_menu[0][spell_pos] = i;
|
||||
spell_pos++;
|
||||
}
|
||||
if(pc_can_cast_spell(current_pc, cSpell::fromNum(eSkill::MAGE_SPELLS, i))) {
|
||||
on_spell_menu[0][spell_pos] = i;
|
||||
spell_pos++;
|
||||
}
|
||||
for(i = 0; i < 62; i++)
|
||||
if(on_spell_menu[0][i] != old_on_spell_menu[0][i])
|
||||
need_menu_change = true;
|
||||
if(on_spell_menu[0][i] != old_on_spell_menu[0][i])
|
||||
need_menu_change = true;
|
||||
if(need_menu_change) {
|
||||
while(GetMenuItemCount(spell_menu) > 2) {
|
||||
RemoveMenu(spell_menu, 2, MF_BYPOSITION);
|
||||
}
|
||||
for(i = 0; i < 62; i++)
|
||||
if(on_spell_menu[0][i] >= 0) {
|
||||
eSpell spell = cSpell::fromNum(eSkill::MAGE_SPELLS, on_spell_menu[0][i]);
|
||||
std::string name = get_str("magic-names", i + 1);
|
||||
if((*spell).cost >= 0)
|
||||
sprintf(spell_name, " L%d - %s, C %d", (*spell).level, name.c_str(), (*spell).cost);
|
||||
else sprintf(spell_name, " L%d - %s, C ?", (*spell).level, name.c_str());
|
||||
AppendMenuA(spell_menu, MF_STRING | MF_ENABLED, 2000 + i, spell_name);
|
||||
}
|
||||
if(on_spell_menu[0][i] >= 0) {
|
||||
eSpell spell = cSpell::fromNum(eSkill::MAGE_SPELLS, on_spell_menu[0][i]);
|
||||
std::string name = (*spell).name();
|
||||
if((*spell).cost >= 0)
|
||||
sprintf(spell_name, " L%d - %s, C %d", (*spell).level, name.c_str(), (*spell).cost);
|
||||
else sprintf(spell_name, " L%d - %s, C ?", (*spell).level, name.c_str());
|
||||
AppendMenuA(spell_menu, MF_STRING | MF_ENABLED, 2000 + int(spell), spell_name);
|
||||
}
|
||||
}
|
||||
|
||||
need_menu_change = false;
|
||||
@@ -203,26 +208,26 @@ void adjust_spell_menus() {
|
||||
on_spell_menu[1][i] = -1;
|
||||
}
|
||||
for(i = 0; i < 62; i++)
|
||||
if(pc_can_cast_spell(current_pc, cSpell::fromNum(eSkill::PRIEST_SPELLS, i))) {
|
||||
on_spell_menu[1][spell_pos] = i;
|
||||
spell_pos++;
|
||||
}
|
||||
if(pc_can_cast_spell(current_pc, cSpell::fromNum(eSkill::PRIEST_SPELLS, i))) {
|
||||
on_spell_menu[1][spell_pos] = i;
|
||||
spell_pos++;
|
||||
}
|
||||
for(i = 0; i < 62; i++)
|
||||
if(on_spell_menu[1][i] != old_on_spell_menu[1][i])
|
||||
need_menu_change = true;
|
||||
if(on_spell_menu[1][i] != old_on_spell_menu[1][i])
|
||||
need_menu_change = true;
|
||||
if(need_menu_change) {
|
||||
while(GetMenuItemCount(spell_menu) > 2) {
|
||||
RemoveMenu(spell_menu, 2, MF_BYPOSITION);
|
||||
}
|
||||
for(i = 0; i < 62; i++)
|
||||
if(on_spell_menu[1][i] >= 0) {
|
||||
eSpell spell = cSpell::fromNum(eSkill::MAGE_SPELLS, on_spell_menu[1][i]);
|
||||
std::string name = get_str("magic-names", i + 101);
|
||||
if((*spell).cost >= 0)
|
||||
sprintf(spell_name, " L%d - %s, C %d", (*spell).level, name.c_str(), (*spell).cost);
|
||||
else sprintf(spell_name, " L%d - %s, C ?", (*spell).level, name.c_str());
|
||||
AppendMenuA(spell_menu, MF_STRING | MF_ENABLED, 2000 + i, spell_name);
|
||||
}
|
||||
if(on_spell_menu[1][i] >= 0) {
|
||||
eSpell spell = cSpell::fromNum(eSkill::MAGE_SPELLS, on_spell_menu[1][i]);
|
||||
std::string name = (*spell).name();
|
||||
if((*spell).cost >= 0)
|
||||
sprintf(spell_name, " L%d - %s, C %d", (*spell).level, name.c_str(), (*spell).cost);
|
||||
else sprintf(spell_name, " L%d - %s, C ?", (*spell).level, name.c_str());
|
||||
AppendMenuA(spell_menu, MF_STRING | MF_ENABLED, 2000 + int(spell), spell_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -118,11 +118,17 @@ void update_item_menu() {
|
||||
void menu_activate() {
|
||||
if(menuHandle == NULL) return;
|
||||
HMENU file_menu = GetSubMenu(menuHandle, FILE_MENU_POS);
|
||||
if(file_in_mem.empty())
|
||||
if(file_in_mem.empty()) {
|
||||
EnableMenuItem(menuHandle, PARTY_MENU_POS, MF_BYPOSITION | MF_GRAYED);
|
||||
EnableMenuItem(menuHandle, SCEN_MENU_POS, MF_BYPOSITION | MF_GRAYED);
|
||||
for(int i = 1; i < GetMenuItemCount(file_menu) - 1; i++)
|
||||
EnableMenuItem(file_menu, i, MF_BYPOSITION | MF_GRAYED);
|
||||
else for(int i = 1; i < GetMenuItemCount(file_menu) - 1; i++)
|
||||
EnableMenuItem(file_menu, i, MF_BYPOSITION | MF_ENABLED);
|
||||
} else {
|
||||
EnableMenuItem(menuHandle, PARTY_MENU_POS, MF_BYPOSITION | MF_ENABLED);
|
||||
EnableMenuItem(menuHandle, SCEN_MENU_POS, MF_BYPOSITION | MF_ENABLED);
|
||||
for(int i = 1; i < GetMenuItemCount(file_menu) - 1; i++)
|
||||
EnableMenuItem(file_menu, i, MF_BYPOSITION | MF_ENABLED);
|
||||
}
|
||||
DrawMenuBar(mainPtr.getSystemHandle());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user