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

Method DrawActorExp

src/window_base.cpp:148–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void Window_Base::DrawActorExp(const Game_Actor& actor, int cx, int cy) const {
149 // Draw EXP-String
150 int width = 7;
151 if (actor.MaxExpValue() < 1000000) {
152 width = 6;
153 contents->TextDraw(cx, cy, 1, lcf::Data::terms.exp_short);
154 }
155
156 // Current Exp of the Actor
157 // ------/------
158 std::stringstream ss;
159 ss << std::setfill(' ') << std::setw(width) << actor.GetExpString();
160
161 // Delimiter
162 ss << '/';
163
164 // Exp for Level up
165 ss << std::setfill(' ') << std::setw(width) << actor.GetNextExpString();
166 contents->TextDraw(cx + (width == 6 ? 12 : 0), cy, Font::ColorDefault, ss.str(), Text::AlignLeft);
167}
168
169void Window_Base::DrawActorHp(const Game_Battler& actor, int cx, int cy, int digits, bool draw_max) const {
170 // Draw HP-String

Callers

nothing calls this directly

Calls 4

MaxExpValueMethod · 0.80
TextDrawMethod · 0.80
GetExpStringMethod · 0.80
GetNextExpStringMethod · 0.80

Tested by

no test coverage detected