本文整理汇总了C++中Mission::Name方法的典型用法代码示例。如果您正苦于以下问题:C++ Mission::Name方法的具体用法?C++ Mission::Name怎么用?C++ Mission::Name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mission
的用法示例。
在下文中一共展示了Mission::Name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
MsnSelectDlg::OnDel(AWEvent* event)
{
const char* cname = 0;
if (cmb_campaigns)
cname = cmb_campaigns->GetSelectedItem();
else if (lst_campaigns)
cname = lst_campaigns->GetSelectedItem();
Campaign* c = Campaign::SelectCampaign(cname);
if (!c) return;
Mission* m = c->GetMission(mission_id);
if (!m) return;
ConfirmDlg* confirm = manager->GetConfirmDlg();
if (confirm) {
char msg[256];
sprintf_s(msg, Game::GetText("MsnSelectDlg.are-you-sure").data(), m->Name());
confirm->SetMessage(msg);
confirm->SetTitle(Game::GetText("MsnSelectDlg.confirm-delete"));
confirm->SetParentControl(btn_del);
manager->ShowConfirmDlg();
}
else {
OnDelConfirm(event);
}
}
示例2: BeginPaint
bool
StarServer::OnPaint()
{
PAINTSTRUCT paintstruct;
HDC hdc = BeginPaint(hwnd, &paintstruct);
Text txt_title = title_text;
Text txt_mode;
Text txt_users = Game::GetText("server.no-users");
char buf[256];
txt_title += " ";
txt_title += versionInfo;
switch (game_mode) {
case LOAD_MODE:
case MENU_MODE:
txt_mode = Game::GetText("server.mode.lobby");
if (lobby_server) {
sprintf_s(buf, Game::GetText("server.users").data(), lobby_server->NumUsers());
txt_users = buf;
}
break;
case PLAY_MODE:
txt_mode = Game::GetText("server.mode.active");
if (lobby_server) {
sprintf_s(buf, Game::GetText("server.users-and-players").data(), lobby_server->NumUsers(), NetGame::NumPlayers());
}
else {
sprintf_s(buf, Game::GetText("server.players").data(), NetGame::NumPlayers());
}
txt_users = buf;
break;
default:
txt_mode = Game::GetText("server.mode.other");
break;
}
if (lobby_server && lobby_server->GetStatus() == NetServerInfo::PERSISTENT)
txt_mode += " " + Game::GetText("server.alt.persistent");
if (paused)
txt_mode += " " + Game::GetText("server.alt.paused");
TextOut(hdc, 4, 4, txt_title, txt_title.length());
TextOut(hdc, 4, 22, txt_mode, txt_mode.length());
TextOut(hdc, 4, 40, txt_users, txt_users.length());
Sim* sim = Sim::GetSim();
if (sim && sim->GetMission()) {
Mission* mission = sim->GetMission();
Text txt_msn = Game::GetText("server.mission");
txt_msn += mission->Name();
TextOut(hdc, 4, 58, txt_msn, txt_msn.length());
}
EndPaint(hwnd, &paintstruct);
return true;
}