本文整理汇总了C++中Heroes::PortraitRedraw方法的典型用法代码示例。如果您正苦于以下问题:C++ Heroes::PortraitRedraw方法的具体用法?C++ Heroes::PortraitRedraw怎么用?C++ Heroes::PortraitRedraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Heroes
的用法示例。
在下文中一共展示了Heroes::PortraitRedraw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MeetingDialog
void Heroes::MeetingDialog(Heroes & heroes2)
{
if(Settings::Get().QVGA()) return PocketPC::HeroesMeeting(*this, heroes2);
Display & display = Display::Get();
// cursor
Cursor & cursor = Cursor::Get();
cursor.Hide();
cursor.SetThemes(cursor.POINTER);
const Sprite &backSprite = AGG::GetICN(ICN::SWAPWIN, 0);
const Point cur_pt((display.w() - backSprite.w()) / 2, (display.h() - backSprite.h()) / 2);
SpriteBack background(Rect(cur_pt, backSprite.w(), backSprite.h()));
Point dst_pt(cur_pt);
std::string message;
Rect src_rt(0, 0, 640, 480);
// background
dst_pt.x = cur_pt.x;
dst_pt.y = cur_pt.y;
backSprite.Blit(src_rt, dst_pt);
// header
message = _("%{name1} meets %{name2}");
StringReplace(message, "%{name1}", GetName());
StringReplace(message, "%{name2}", heroes2.GetName());
Text text(message, Font::BIG);
text.Blit(cur_pt.x + 320 - text.w() / 2, cur_pt.y + 26);
// portrait
dst_pt.x = cur_pt.x + 93;
dst_pt.y = cur_pt.y + 72;
PortraitRedraw(dst_pt.x, dst_pt.y, PORT_BIG, display);
dst_pt.x = cur_pt.x + 445;
dst_pt.y = cur_pt.y + 72;
heroes2.PortraitRedraw(dst_pt.x, dst_pt.y, PORT_BIG, display);
dst_pt.x = cur_pt.x + 34;
dst_pt.y = cur_pt.y + 75;
MoraleIndicator moraleIndicator1(*this);
moraleIndicator1.SetPos(dst_pt);
moraleIndicator1.Redraw();
dst_pt.x = cur_pt.x + 34;
dst_pt.y = cur_pt.y + 115;
LuckIndicator luckIndicator1(*this);
luckIndicator1.SetPos(dst_pt);
luckIndicator1.Redraw();
dst_pt.x = cur_pt.x + 566;
dst_pt.y = cur_pt.y + 75;
MoraleIndicator moraleIndicator2(heroes2);
moraleIndicator2.SetPos(dst_pt);
moraleIndicator2.Redraw();
dst_pt.x = cur_pt.x + 566;
dst_pt.y = cur_pt.y + 115;
LuckIndicator luckIndicator2(heroes2);
luckIndicator2.SetPos(dst_pt);
luckIndicator2.Redraw();
// primary skill
SpriteBack backPrimary(Rect(cur_pt.x + 255, cur_pt.y + 50, 130, 135));
PrimarySkillsBar primskill_bar1(this, true);
primskill_bar1.SetColRows(1, 4);
primskill_bar1.SetVSpace(-1);
primskill_bar1.SetTextOff(70, -25);
primskill_bar1.SetPos(cur_pt.x + 216, cur_pt.y + 51);
PrimarySkillsBar primskill_bar2(&heroes2, true);
primskill_bar2.SetColRows(1, 4);
primskill_bar2.SetVSpace(-1);
primskill_bar2.SetTextOff(-70, -25);
primskill_bar2.SetPos(cur_pt.x + 389, cur_pt.y + 51);
RedrawPrimarySkillInfo(cur_pt, &primskill_bar1, &primskill_bar2);
// secondary skill
SecondarySkillsBar secskill_bar1;
secskill_bar1.SetColRows(8, 1);
secskill_bar1.SetHSpace(-1);
secskill_bar1.SetContent(secondary_skills);
secskill_bar1.SetPos(cur_pt.x + 22, cur_pt.y + 199);
secskill_bar1.Redraw();
SecondarySkillsBar secskill_bar2;
secskill_bar2.SetColRows(8, 1);
secskill_bar2.SetHSpace(-1);
secskill_bar2.SetContent(heroes2.GetSecondarySkills());
secskill_bar2.SetPos(cur_pt.x + 353, cur_pt.y + 199);
secskill_bar2.Redraw();
// army
dst_pt.x = cur_pt.x + 36;
dst_pt.y = cur_pt.y + 267;
//.........这里部分代码省略.........