本文整理汇总了C++中cWindowManager::push方法的典型用法代码示例。如果您正苦于以下问题:C++ cWindowManager::push方法的具体用法?C++ cWindowManager::push怎么用?C++ cWindowManager::push使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cWindowManager
的用法示例。
在下文中一共展示了cWindowManager::push方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process
void cScreenTown::process()
{
if (!ids_set)set_ids(); // we need to make sure the ID variables are set
init();
if (g_InterfaceEvents.GetNumEvents() == 0) return; // no events means we can go home
if (girlimage_id != -1 && !eventrunning) HideImage(girlimage_id, true);
/*
* otherwise, compare event IDs
*
* if it's the back button, pop the window off the stack
* and we're done
*/
/* */if (g_InterfaceEvents.CheckButton(back_id)) { g_InitWin = true; g_WinManager.Pop(); return; }
else if (g_InterfaceEvents.CheckButton(slavemarket_id)) { g_InitWin = true; g_WinManager.push("Slave Market"); return; }
else if (g_InterfaceEvents.CheckButton(prison_id)) { g_InitWin = true; g_WinManager.push("Prison"); return; }
else if (g_InterfaceEvents.CheckButton(house_id)) { g_Building = BUILDING_HOUSE; g_CurrHouse = 0; g_InitWin = true; g_WinManager.push("Player House"); return; }
else if (g_InterfaceEvents.CheckButton(clinic_id)) { check_clinic(0); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(studio_id)) { check_studio(0); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(arena_id)) { check_arena(0); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(centre_id)) { check_centre(0); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(farm_id)) { check_farm(0); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(mayor_id)) { g_InitWin = true; g_WinManager.push("Mayor"); return; }
else if (g_InterfaceEvents.CheckButton(bank_id)) { g_InitWin = true; g_WinManager.push("Bank"); return; }
else if (g_InterfaceEvents.CheckButton(shop_id)) { g_InitWin = true; g_AllTogle = false; g_WinManager.push("Item Management"); return; }
else if (g_InterfaceEvents.CheckButton(brothel0_id)) { check_brothel(0); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(brothel1_id)) { check_brothel(1); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(brothel2_id)) { check_brothel(2); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(brothel3_id)) { check_brothel(3); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(brothel4_id)) { check_brothel(4); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(brothel5_id)) { check_brothel(5); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(brothel6_id)) { check_brothel(6); g_InitWin = true; return; }
else if (g_InterfaceEvents.CheckButton(walk_id)) { do_walk(); if (!g_Cheats) g_WalkAround = true; g_InitWin = true; }
else if (g_InterfaceEvents.CheckButton(setup_id)) { g_InitWin = true; g_WinManager.push("Property Management"); return; } // `J` added
}
示例2: check_events
void cScreenMayor::check_events()
{
if (g_InterfaceEvents.GetNumEvents() == 0) return; // no events means we can go home
if (g_InterfaceEvents.CheckButton(back_id)) // if it's the back button, pop the window off the stack and we're done
{
g_InitWin = true;
g_WinManager.Pop();
return;
}
if (g_InterfaceEvents.CheckButton(bribe_id))
{
SetBribe = true;
g_GetInput.ModeGetInt();
g_WinManager.push("GetInput");
g_InitWin = true;
return;
}
}
示例3: ViewSelectedGirl
void cScreenCentreManagement::ViewSelectedGirl()
{
if (selected_girl)
{
if (GirlDead(selected_girl)) return;
//load up the cycle_girls vector with the ordered list of girl IDs
FillSortedIDList(girllist_id, &cycle_girls, &cycle_pos);
for (int i = cycle_girls.size(); i-- > 0;)
{ // no viewing dead girls
if (g_Centre.GetGirl(g_CurrCentre, cycle_girls[i])->health() <= 0)
cycle_girls.erase(cycle_girls.begin() + i);
}
g_InitWin = true;
g_WinManager.push("Girl Details");
return;
}
}
示例4: check_farm
void cScreenTown::check_farm(int FarmNum)
{ // player clicked on one of the brothels
if (g_Farm.GetNumBrothels() == FarmNum)
{ // player doesn't own this Studio... can he buy it?
static_brothel_data *bck = farm_data + FarmNum;
locale syslocale("");
stringstream ss;
ss.imbue(syslocale);
if (!g_Gold.afford(bck->price) || g_Gangs.GetNumBusinessExtorted() < bck->business)
{ // can't buy it
ss << gettext("This building costs ") << bck->price << gettext(" gold and you need to control at least ") << bck->business << gettext(" businesses.");
if (!g_Gold.afford(bck->price))
ss << "\n" << gettext("You need ") << (bck->price - g_Gold.ival()) << gettext(" more gold to afford it.");
if (g_Gangs.GetNumBusinessExtorted() < bck->business)
ss << "\n" << gettext("You need to control ") << (bck->business - g_Gangs.GetNumBusinessExtorted()) << gettext(" more businesses.");
g_MessageQue.AddToQue(ss.str(), 0);
}
else
{ // can buy it
ss << gettext("Do you wish to purchase this building for ") << bck->price << gettext(" gold? It has ") << bck->rooms << gettext(" rooms.");
g_MessageQue.AddToQue(ss.str(), 2);
g_ChoiceManager.CreateChoiceBox(224, 112, 352, 384, 0, 2, 32, 8);
g_ChoiceManager.AddChoice(0, gettext("Buy It"), 0);
g_ChoiceManager.AddChoice(0, gettext("Don't Buy It"), 1);
g_ChoiceManager.SetActive(0);
BuyFarm = FarmNum;
}
}
else
{ // player owns this brothel... go to it
g_Building = BUILDING_FARM;
g_CurrFarm = FarmNum;
g_WinManager.push("Farm Screen");
}
}
示例5: check_events
void cScreenGirlDetails::check_events()
{
// no events means we can go home
if (g_InterfaceEvents.GetNumEvents() == 0) return;
// if it's the back button, pop the window off the stack and we're done
if (g_InterfaceEvents.CheckButton(back_id))
{
g_InitWin = true;
g_WinManager.Pop();
return;
}
if (g_InterfaceEvents.CheckSlider(houseperc_id))
{
g_Girls.SetStat(selected_girl, STAT_HOUSE, SliderValue(houseperc_id));
ss.str("");
ss << gettext("House Percentage: ") << SliderValue(houseperc_id) << gettext("%");
EditTextItem(ss.str(), housepercval_id);
// Rebelliousness might have changed, so update details
if (DetailLevel == 0)
{
string detail = g_Girls.GetDetailsString(selected_girl);
EditTextItem(detail, girldesc_id);
}
return;
}
if (g_InterfaceEvents.CheckButton(more_id))
{
if (DetailLevel == 0) { DetailLevel = 1; EditTextItem(g_Girls.GetMoreDetailsString(selected_girl), girldesc_id); }
else if (DetailLevel == 1) { DetailLevel = 2; EditTextItem(g_Girls.GetThirdDetailsString(selected_girl), girldesc_id); }
else { DetailLevel = 0; EditTextItem(g_Girls.GetDetailsString(selected_girl), girldesc_id); }
}
if (g_InterfaceEvents.CheckButton(day_id))
{
DisableButton(day_id, true);
DisableButton(night_id, false);
g_InitWin = true;
Day0Night1 = SHIFT_DAY;
}
if (g_InterfaceEvents.CheckButton(night_id))
{
DisableButton(day_id, false);
DisableButton(night_id, true);
g_InitWin = true;
Day0Night1 = SHIFT_NIGHT;
}
if (g_InterfaceEvents.CheckCheckbox(antipreg_id))
{
selected_girl->m_UseAntiPreg = (IsCheckboxOn(antipreg_id));
}
if (g_InterfaceEvents.CheckListbox(traitlist_id))
{
int selection = GetLastSelectedItemFromList(traitlist_id);
if (selection != -1)
EditTextItem(selected_girl->m_Traits[selection]->m_Desc, traitdesc_id);
else
EditTextItem("", traitdesc_id);
}
if (g_InterfaceEvents.CheckListbox(jobtypelist_id))
{
SetJob = true;
RefreshJobList();
}
if (g_InterfaceEvents.CheckListbox(joblist_id))
{
bool fulltime = g_CTRLDown;
int selection = GetSelectedItemFromList(joblist_id);
if (selection != -1)
{
int old_job = (Day0Night1 ? selected_girl->m_NightJob : selected_girl->m_DayJob);
// handle special job requirements and assign - if HandleSpecialJobs returns true, the job assignment was modified or cancelled
if (g_Brothels.m_JobManager.HandleSpecialJobs(g_CurrBrothel, selected_girl, selection, old_job, Day0Night1, fulltime))
{
selection = (Day0Night1 ? selected_girl->m_NightJob : selected_girl->m_DayJob);
SetSelectedItemInList(joblist_id, selection, false);
}
// refresh job worker counts for former job and current job
if (old_job != selection)
{
SetSelectedItemText(joblist_id, old_job, g_Brothels.m_JobManager.JobDescriptionCount(old_job, g_CurrBrothel, Day0Night1));
SetSelectedItemText(joblist_id, selection, g_Brothels.m_JobManager.JobDescriptionCount(selection, g_CurrBrothel, Day0Night1));
}
RefreshJobList();
}
}
if (g_InterfaceEvents.CheckButton(inventory_id))
{
if (selected_girl)
{
if (GirlDead(selected_girl)) return;
g_InitWin = true;
g_AllTogle = true;
g_WinManager.push("Item Management");
return;
}
}
if (g_InterfaceEvents.CheckButton(gallery_id))
{
g_WinManager.push("Gallery");
//.........这里部分代码省略.........
示例6: check_keys
bool cScreenGirlDetails::check_keys()
{
if (g_LeftArrow)
{
g_LeftArrow = false;
PrevGirl();
return true;
}
if (g_RightArrow)
{
g_RightArrow = false;
NextGirl();
return true;
}
if (g_AltKeys)
{
if (g_A_Key)
{
g_A_Key = false;
PrevGirl();
return true;
}
if (g_D_Key)
{
g_D_Key = false;
NextGirl();
return true;
}
if (g_H_Key || g_J_Key)
{
int mod = 1; if (g_H_Key) mod = -1;
g_Girls.UpdateStat(selected_girl, STAT_HOUSE, mod);
g_H_Key = g_J_Key = false;
SliderValue(houseperc_id, g_Girls.GetStat(selected_girl, STAT_HOUSE));
ss.str("");
ss << gettext("House Percentage: ") << g_Girls.GetStat(selected_girl, STAT_HOUSE) << gettext("%");
EditTextItem(ss.str(), housepercval_id);
// Rebelliousness might have changed, so update details
if (DetailLevel == 0)
{
string detail = g_Girls.GetDetailsString(selected_girl);
EditTextItem(detail, girldesc_id);
}
return true;
}
if (g_S_Key)
{
g_S_Key = false;
if (g_ShiftDown)
{
DetailLevel = 2;
EditTextItem(g_Girls.GetThirdDetailsString(selected_girl), girldesc_id);
}
else
{
if (DetailLevel == 0) { DetailLevel = 1; EditTextItem(g_Girls.GetMoreDetailsString(selected_girl), girldesc_id); }
else { DetailLevel = 0; EditTextItem(g_Girls.GetDetailsString(selected_girl), girldesc_id); }
}
return true;
}
if (g_SpaceKey)
{
g_SpaceKey = false;
g_WinManager.push("Gallery");
g_InitWin = true;
return true;
}
}
return false;
}
示例7: process
void cClinicScreen::process()
{
/*
* we need to make sure the ID variables are set
*/
if (!ids_set) set_ids();
init();
if (g_InitWin)
{
EditTextItem(g_Clinic.GetBrothelString(0), clinicdetails_id);
g_InitWin = false;
}
/*
* no events means we can go home
*/
if (g_InterfaceEvents.GetNumEvents() == 0) return;
/*
* otherwise, compare event IDs
*
* if it's the back button, pop the window off the stack
* and we're done
*/
if (g_InterfaceEvents.CheckButton(back_id))
{
g_InitWin = true;
g_WinManager.Pop();
return;
}
else if (g_InterfaceEvents.CheckButton(walk_id))
{
g_InitWin = true;
g_WinManager.push("Clinic Try");
return;
}
else if (g_InterfaceEvents.CheckButton(girls_id))
{
g_InitWin = true;
g_WinManager.push("Clinic");
return;
}
else if (g_InterfaceEvents.CheckButton(staff_id))
{
g_InitWin = true;
g_WinManager.push("Gangs");
return;
}
else if (g_InterfaceEvents.CheckButton(turns_id))
{
g_InitWin = true;
g_WinManager.push("TurnSummary");
return;
}
else if (g_InterfaceEvents.CheckButton(setup_id))
{
g_Building = BUILDING_CLINIC;
g_InitWin = true;
g_WinManager.push("Building Setup");
return;
}
else if (g_InterfaceEvents.CheckButton(dungeon_id))
{
g_InitWin = true;
g_WinManager.push("Dungeon");
return;
}
else if (g_InterfaceEvents.CheckButton(weeks_id))
{
g_InitWin = true;
if (!g_CTRLDown) { g_CTRLDown = false; AutoSaveGame(); }
NextWeek();
g_WinManager.push("TurnSummary");
return;
}
}
示例8: check_events
void cScreenBrothelManagement::check_events()
{
if (g_InterfaceEvents.GetNumEvents() != 0)
{
if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_girls))
{
g_InitWin = true;
g_WinManager.push("Girl Management");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_staff))
{
g_InitWin = true;
g_WinManager.push("Gangs");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_setup))
{
g_InitWin = true;
g_WinManager.push("Building Setup");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_dungeon))
{
g_InitWin = true;
g_WinManager.push("Dungeon");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_town))
{
g_InitWin = true;
g_WinManager.push("Town");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_save))
{
SaveGame(g_CTRLDown);
g_MessageQue.AddToQue("Game Saved", COLOR_GREEN);
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_week))
{
g_InitWin = true;
if (!g_CTRLDown) { g_CTRLDown = false; AutoSaveGame(); }
NextWeek();
g_WinManager.push("TurnSummary");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_turn))
{
g_InitWin = true;
g_CurrentScreen = SCREEN_TURNSUMMARY;
g_WinManager.push("TurnSummary");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_quit))
{
g_InitWin = true;
g_GetInput.ModeConfirmExit();
g_WinManager.push("GetInput");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_next))
{
g_CurrBrothel++;
if (g_CurrBrothel >= g_Brothels.GetNumBrothels())
g_CurrBrothel = 0;
g_InitWin = true;
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_prev))
{
g_CurrBrothel--;
if (g_CurrBrothel < 0)
g_CurrBrothel = g_Brothels.GetNumBrothels() - 1;
g_InitWin = true;
return;
}
}
}