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

Method Refresh

src/window_skillstatus.cpp:37–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void Window_SkillStatus::Refresh() {
38 contents->ClearRect(Rect(0, 0, contents->GetWidth(), 16));
39
40 // Actors are guaranteed to be valid
41 int x = 0;
42 int y = 2;
43 DrawActorName(*actor, x, y);
44 x += 80;
45 DrawActorLevel(*actor, x, y);
46 x += 44;
47 DrawActorState(*actor, x, y);
48 int hpdigits = (actor->MaxHpValue() >= 1000) ? 4 : 3;
49 int spdigits = (actor->MaxSpValue() >= 1000) ? 4 : 3;
50 x += (96 - hpdigits * 6 - spdigits * 6);
51 DrawActorHp(*actor, x, y, hpdigits);
52 x += (66 + hpdigits * 6 - spdigits * 6);
53 DrawActorSp(*actor, x, y, spdigits);
54}

Callers

nothing calls this directly

Calls 5

ClearRectMethod · 0.80
RectClass · 0.70
GetWidthMethod · 0.45
MaxHpValueMethod · 0.45
MaxSpValueMethod · 0.45

Tested by

no test coverage detected