MCPcopy Create free account
hub / github.com/EasyRPG/Player / Refresh

Method Refresh

src/window_menustatus.cpp:40–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void Window_MenuStatus::Refresh() {
41 contents->Clear();
42
43 item_max = Main_Data::game_party->GetActors().size();
44
45 int y = 0;
46 for (int i = 0; i < item_max; ++i) {
47 // The party always contains valid battlers
48 const Game_Actor& actor = *(Main_Data::game_party->GetActors()[i]);
49
50 int face_x = 0;
51 if (Player::IsRPG2k3()) {
52 if (!Feature::HasRow()) {
53 face_x = 4;
54 } else {
55 face_x = actor.GetBattleRow() == Game_Actor::RowType::RowType_back ? 8 : 0;
56 }
57 }
58 DrawActorFace(actor, face_x, i*48 + y);
59
60 DrawActorName(actor, 48 + 8 + text_offset, i*48 + 2 + y);
61 DrawActorTitle(actor, 48 + 8 + 88 + text_offset, i*48 + 2 + y);
62 DrawActorLevel(actor, 48 + 8 + text_offset, i*48 + 2 + 16 + y);
63 DrawActorState(actor, 48 + 8 + 42 + text_offset, i*48 + 2 + 16 + y);
64 DrawActorExp(actor, 48 + 8 + text_offset, i*48 + 2 + 16 + 16 + y);
65 int digits = (actor.MaxHpValue() >= 1000 || actor.MaxSpValue() >= 1000) ? 4 : 3;
66 DrawActorHp(actor, 48 + 8 + 106 + text_offset - (digits == 3 ? 0 : 12), i * 48 + 2 + 16 + y, digits);
67 DrawActorSp(actor, 48 + 8 + 106 + text_offset - (digits == 3 ? 0 : 12), i * 48 + 2 + 16 + 16 + y, digits);
68
69 y += 10;
70 }
71}
72
73void Window_MenuStatus::UpdateCursorRect()
74{

Callers

nothing calls this directly

Calls 6

GetBattleRowMethod · 0.80
ClearMethod · 0.45
sizeMethod · 0.45
GetActorsMethod · 0.45
MaxHpValueMethod · 0.45
MaxSpValueMethod · 0.45

Tested by

no test coverage detected