Ejemplo n.º 1
0
void
CmpLoadDlg::MoveTo(const Rect& r)
{
	FormWindow::MoveTo(r);

	Campaign* campaign = Campaign::GetCampaign();

	if (campaign && img_title && campaign->GetImage(3)) {
		Bitmap* bmp = campaign->GetImage(3);

		Rect tgt_rect;
		tgt_rect.w = img_title->Width();
		tgt_rect.h = img_title->Height();

		img_title->SetTargetRect(tgt_rect);
		img_title->SetPicture(*bmp);
	}
}
Ejemplo n.º 2
0
void
CmpLoadDlg::Show()
{
	FormWindow::Show();

	Campaign* campaign = Campaign::GetCampaign();

	if (campaign) {
		Bitmap* bmp = campaign->GetImage(3);
		if (img_title && bmp) {
			Rect tgt_rect;
			tgt_rect.w = img_title->Width();
			tgt_rect.h = img_title->Height();

			img_title->SetTargetRect(tgt_rect);
			img_title->SetPicture(*bmp);
		}

		if (lbl_title)
		lbl_title->SetText(campaign->Name());
	}

	show_time = Game::RealTime();
}