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

Method Refresh

src/window_shopstatus.cpp:34–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void Window_ShopStatus::Refresh() {
35 contents->Clear();
36
37 int number = 0;
38 int equipped = 0;
39
40 if (item_id != 0) {
41 number = Main_Data::game_party->GetItemCount(item_id);
42 equipped = Main_Data::game_party->GetEquippedItemCount(item_id);
43 }
44
45 contents->TextDraw(0, 2, 1, lcf::Data::terms.possessed_items);
46 contents->TextDraw(0, 18, 1, lcf::Data::terms.equipped_items);
47
48 contents->TextDraw(120, 2, Font::ColorDefault, std::to_string(number), Text::AlignRight);
49
50 contents->TextDraw(120, 18, Font::ColorDefault, std::to_string(equipped), Text::AlignRight);
51}
52
53void Window_ShopStatus::SetItemId(int new_item_id) {
54 if (new_item_id != item_id) {

Callers

nothing calls this directly

Calls 4

GetEquippedItemCountMethod · 0.80
TextDrawMethod · 0.80
ClearMethod · 0.45
GetItemCountMethod · 0.45

Tested by

no test coverage detected