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

Method SetupChoices

src/game_interpreter.cpp:970–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

968}
969
970void Game_Interpreter::SetupChoices(const std::vector<std::string>& choices, int indent, PendingMessage& pm) {
971 // Set choices to message text
972 pm.SetChoiceResetColors(false);
973 for (int i = 0; i < 4 && i < static_cast<int>(choices.size()); i++) {
974 pm.PushChoice(choices[i]);
975 }
976
977 pm.SetChoiceContinuation([this, indent](int choice_result) {
978 SetSubcommandIndex(indent, choice_result);
979 return AsyncOp();
980 });
981
982 // save game compatibility with RPG_RT
983 ReserveSubcommandIndex(indent);
984}
985
986bool Game_Interpreter::CommandShowChoices(lcf::rpg::EventCommand const& com) { // code 10140
987 auto& index = GetFrame().current_command;

Callers

nothing calls this directly

Calls 5

SetChoiceResetColorsMethod · 0.80
PushChoiceMethod · 0.80
SetChoiceContinuationMethod · 0.80
AsyncOpClass · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected