本文整理汇总了C++中cWindowManager::Push方法的典型用法代码示例。如果您正苦于以下问题:C++ cWindowManager::Push方法的具体用法?C++ cWindowManager::Push怎么用?C++ cWindowManager::Push使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cWindowManager
的用法示例。
在下文中一共展示了cWindowManager::Push方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: check_events
//.........这里部分代码省略.........
ss.str("");
ss << g_Centre.m_JobManager.JobName[selected_girl->m_NightJob];
SetSelectedItemColumnText(girllist_id, GSelection, ss.str(), m_ListBoxes[girllist_id]->NightJobColumn());
// refresh job worker counts for former job and current job
SetSelectedItemText(joblist_id, old_job, g_Centre.m_JobManager.JobDescriptionCount(old_job, 0, Day0Night1, false, false, false, true));
SetSelectedItemText(joblist_id, new_job, g_Centre.m_JobManager.JobDescriptionCount(new_job, 0, Day0Night1, false, false, false, true));
}
if (selected_girl->m_DayJob == JOB_REHAB) // `J` added
{
ss.str("");
ss << g_Centre.m_JobManager.JobName[selected_girl->m_DayJob] << " (" << 3 - selected_girl->m_WorkingDay << ")";
SetSelectedItemColumnText(girllist_id, GSelection, ss.str(), m_ListBoxes[girllist_id]->DayJobColumn());
}
else if (selected_girl->m_YesterDayJob == JOB_REHAB && selected_girl->m_DayJob != JOB_REHAB && ((selected_girl->m_WorkingDay > 0) || selected_girl->m_PrevWorkingDay > 0))
{
ss.str("");
ss << g_Centre.m_JobManager.JobName[selected_girl->m_DayJob] << " **";
SetSelectedItemColumnText(girllist_id, GSelection, ss.str(), m_ListBoxes[girllist_id]->DayJobColumn());
}
if (selected_girl->m_NightJob == JOB_REHAB) // `J` added
{
ss.str("");
ss << g_Centre.m_JobManager.JobName[selected_girl->m_NightJob] << " (" << 3 - selected_girl->m_WorkingDay << ")";
SetSelectedItemColumnText(girllist_id, GSelection, ss.str(), m_ListBoxes[girllist_id]->NightJobColumn());
}
else if (selected_girl->m_YesterNightJob == JOB_REHAB && selected_girl->m_NightJob != JOB_REHAB && ((selected_girl->m_WorkingDay > 0) || selected_girl->m_PrevWorkingDay > 0))
{
ss.str("");
ss << g_Centre.m_JobManager.JobName[selected_girl->m_NightJob] << " **";
SetSelectedItemColumnText(girllist_id, GSelection, ss.str(), m_ListBoxes[girllist_id]->NightJobColumn());
}
if (selected_girl && selected_girl->m_YesterDayJob == JOB_REHAB && new_job != JOB_REHAB && (selected_girl->m_WorkingDay > 0 || selected_girl->m_PrevWorkingDay > 0))
{ // `J` added
EditTextItem(g_Centre.m_JobManager.JobDesc[new_job]
+ "\n** This girl was in Rehab, if you send her somewhere else, she will have to start her Rehab over."
, jobdesc_id);
}
GSelection = GetNextSelectedItemFromList(girllist_id, pos + 1, pos);
}
}
else EditTextItem("Nothing Selected", jobdesc_id);
}
if (g_InterfaceEvents.CheckListbox(girllist_id))
{
selection = GetSelectedItemFromList(girllist_id);
if (selection != -1)
{
selected_girl = g_Centre.GetGirl(g_CurrCentre, selection);
if (ListDoubleClicked(girllist_id)) ViewSelectedGirl(); // If double-clicked, try to bring up girl details
DisableButton(freeslave_id, selected_girl->is_free());
DisableButton(viewdetails_id, false);
RefreshSelectedJobType();
}
else
{
DisableButton(freeslave_id, true);
DisableButton(viewdetails_id, true);
selected_girl = 0;
selection = -1;
}
lastNum = -2;
update_image();
return;
}
if (g_InterfaceEvents.CheckButton(freeslave_id))
{
if (selected_girl)
{
if (IsMultiSelected(girllist_id))
{ // multiple girls selected
g_MessageQue.AddToQue("Are you sure you wish to give these girls their freedom?", 0);
g_ChoiceManager.CreateChoiceBox(224, 112, 352, 384, 0, 2, 32, strlen("Keep as a slaves"));
g_ChoiceManager.AddChoice(0, "Grant Freedom", 0);
g_ChoiceManager.AddChoice(0, "Keep as a slaves", 1);
g_ChoiceManager.SetActive(0);
FreeGirl = true;
}
else // only one girl selected
{
if (GirlDead(selected_girl)) return;
g_MessageQue.AddToQue("Are you sure you wish to give " + selected_girl->m_Realname + " her freedom?", 0);
g_ChoiceManager.CreateChoiceBox(224, 112, 352, 384, 0, 2, 32, strlen("Keep as a slave"));
g_ChoiceManager.AddChoice(0, "Grant Freedom", 0);
g_ChoiceManager.AddChoice(0, "Keep as a slave", 1);
g_ChoiceManager.SetActive(0);
FreeGirl = true;
}
}
return;
}
if (g_InterfaceEvents.CheckButton(transfer_id))
{
g_InitWin = true;
g_WinManager.Push(TransferGirls, &g_TransferGirls);
return;
}
}
示例2: init
void cScreenTown::init()
{
if (BuyClinic != -1)
{
(g_ChoiceManager.GetChoice(0) == 0 ? GetClinic = true : BuyClinic = -1);
g_ChoiceManager.Free();
}
if (GetClinic)
{
static_brothel_data *bpt = clinic_data + BuyClinic;
g_Gold.brothel_cost(bpt->price);
g_Clinic.NewBrothel(bpt->rooms, bpt->maxrooms);
g_Clinic.SetName(0, gettext("Clinic"));
GetClinic = false;
BuyClinic = -1;
}
if (BuyCentre != -1)
{
(g_ChoiceManager.GetChoice(0) == 0 ? GetCentre = true : BuyCentre = -1);
g_ChoiceManager.Free();
}
if (GetCentre)
{
static_brothel_data *bpt = centre_data + BuyCentre;
g_Gold.brothel_cost(bpt->price);
g_Centre.NewBrothel(bpt->rooms, bpt->maxrooms);
g_Centre.SetName(0, gettext("Centre"));
GetCentre = false;
BuyCentre = -1;
}
if (BuyArena != -1)
{
(g_ChoiceManager.GetChoice(0) == 0 ? GetArena = true : BuyArena = -1);
g_ChoiceManager.Free();
}
if (GetArena)
{
static_brothel_data *bpt = arena_data + BuyArena;
g_Gold.brothel_cost(bpt->price);
g_Arena.NewBrothel(bpt->rooms, bpt->maxrooms);
g_Arena.SetName(0, gettext("Arena"));
GetArena = false;
BuyArena = -1;
}
if (BuyStudio != -1)
{
(g_ChoiceManager.GetChoice(0) == 0 ? GetStudio = true : BuyStudio = -1);
g_ChoiceManager.Free();
}
if (GetStudio)
{
static_brothel_data *bpt = studio_data + BuyStudio;
g_Gold.brothel_cost(bpt->price);
g_Studios.NewBrothel(bpt->rooms, bpt->maxrooms);
g_Studios.SetName(0, gettext("Studio"));
GetStudio = false;
BuyStudio = -1;
}
if (BuyFarm != -1)
{
(g_ChoiceManager.GetChoice(0) == 0 ? GetFarm = true : BuyFarm = -1);
g_ChoiceManager.Free();
}
if (GetFarm)
{
static_brothel_data *bpt = farm_data + BuyFarm;
g_Gold.brothel_cost(bpt->price);
g_Farm.NewBrothel(bpt->rooms, bpt->maxrooms);
g_Farm.SetName(0, gettext("Farm"));
GetFarm = false;
BuyFarm = -1;
}
if (GetName)
{
if (g_ReturnText != "")
{
if (g_Brothels.GetObjective() && g_Brothels.GetObjective()->m_Objective == OBJECTIVE_GETNEXTBROTHEL)
g_Brothels.PassObjective();
static_brothel_data *bpt = brothel_data + BuyBrothel;
g_Gold.brothel_cost(bpt->price);
g_Brothels.NewBrothel(bpt->rooms, bpt->maxrooms);
g_Brothels.SetName(g_Brothels.GetNumBrothels() - 1, g_ReturnText);
g_InitWin = true;
}
GetName = false;
BuyBrothel = -1;
}
if (BuyBrothel != -1)
{
if (g_ChoiceManager.GetChoice(0) == 0)
{
g_MessageQue.AddToQue("Enter a name for your new brothel.", 0);
GetName = true;
g_InitWin = true;
g_WinManager.Push(GetString, &g_GetString);
}
else BuyBrothel = -1;
g_ChoiceManager.Free();
//.........这里部分代码省略.........