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

Method ReplaceCommands

src/window_command.cpp:82–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void Window_Command::ReplaceCommands(std::vector<std::string> in_commands) {
83 commands = std::move(in_commands);
84 commands_enabled.clear();
85 commands_enabled.resize(commands.size(), true);
86 index = 0;
87 item_max = commands.size();
88 const int num_contents = item_max > 0 ? item_max : 1;
89 SetContents(Bitmap::Create(this->width - 16, num_contents * menu_item_height));
90 SetTopRow(0);
91
92 Refresh();
93}

Callers 5

RefreshTargetWindowMethod · 0.45
RefreshCommandWindowMethod · 0.45
PushUiChoicesMethod · 0.45
RefreshTargetWindowMethod · 0.45
RefreshCommandWindowMethod · 0.45

Calls 2

clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected