本文整理汇总了C++中Starshatter::ExecCutscene方法的典型用法代码示例。如果您正苦于以下问题:C++ Starshatter::ExecCutscene方法的具体用法?C++ Starshatter::ExecCutscene怎么用?C++ Starshatter::ExecCutscene使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Starshatter
的用法示例。
在下文中一共展示了Starshatter::ExecCutscene方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
CmdIntelDlg::ExecFrame()
{
CmdDlg::ExecFrame();
if (campaign != Campaign::GetCampaign() || campaign->GetUpdateTime() != update_time) {
campaign = Campaign::GetCampaign();
update_time = campaign->GetUpdateTime();
lst_news->ClearItems();
txt_news->SetText("");
if (img_news)
img_news->SetPicture(bmp_default);
}
if (campaign) {
List<CombatEvent>& events = campaign->GetEvents();
bool auto_scroll = false;
if (events.size() > lst_news->NumItems()) {
while (events.size() > lst_news->NumItems()) {
CombatEvent* info = events[lst_news->NumItems()];
const char* unread = info->Visited() ? " " : "*";
int i = lst_news->AddItemWithData(unread, (DWORD) info) - 1;
char dateline[32];
FormatDayTime(dateline, info->Time());
lst_news->SetItemText(i, 1, dateline);
lst_news->SetItemText(i, 2, info->Title());
lst_news->SetItemText(i, 3, info->Region());
lst_news->SetItemText(i, 4, Game::GetText(info->SourceName()));
if (!info->Visited())
auto_scroll = true;
}
if (lst_news->GetSortColumn() > 0)
lst_news->SortItems();
}
else if (events.size() < lst_news->NumItems()) {
lst_news->ClearItems();
for (int i = 0; i < events.size(); i++) {
CombatEvent* info = events[i];
const char* unread = info->Visited() ? " " : "*";
int j = lst_news->AddItemWithData(unread, (DWORD) info) - 1;
char dateline[32];
FormatDayTime(dateline, info->Time());
lst_news->SetItemText(j, 1, dateline);
lst_news->SetItemText(j, 2, info->Title());
lst_news->SetItemText(j, 3, info->Region());
lst_news->SetItemText(j, 4, Game::GetText(info->SourceName()));
if (!info->Visited())
auto_scroll = true;
}
if (lst_news->GetSortColumn() > 0)
lst_news->SortItems();
txt_news->SetText("");
if (img_news)
img_news->SetPicture(bmp_default);
}
if (auto_scroll) {
int first_unread = -1;
for (int i = 0; i < lst_news->NumItems(); i++) {
if (lst_news->GetItemText(i, 0) == "*") {
first_unread = i;
break;
}
}
if (first_unread >= 0)
lst_news->ScrollTo(first_unread);
}
}
Starshatter* stars = Starshatter::GetInstance();
if (start_scene > 0) {
ShowMovie();
start_scene--;
if (start_scene == 0) {
if (stars && campaign) {
stars->ExecCutscene(event_scene, campaign->Path());
if (stars->InCutscene()) {
Sim* sim = Sim::GetSim();
//.........这里部分代码省略.........