MCPcopy Create free account
hub / github.com/davemoore22/sorcery / execute_action

Method execute_action

src/core/controller.cpp:1379–1417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1377 ui->modal_spell->show = true;
1378 set_flag("want_spell");
1379 } else if (component == "button_invoke") {
1380 // Show Invoke Modal
1381 ui->modal_invoke->regenerate();
1382 ui->modal_invoke->show = true;
1383 set_flag("want_invoke");
1384 } else if (component == "button_keep_yes") {
1385
1386 // Save Character
1387 _ctx.controller->set_flag("confirm_keep_character");
1388
1389 } else if (component == "button_keep_no") {
1390
1391 // Don't save Character
1392 _ctx.controller->set_flag("confirm_discard_character");
1393
1394 } else if (component == "button_buy_leave") {
1395
1396 // Return to the Store
1397 go_to(Enums::Screen::STORE);
1398
1399 } else if (component == "license_return") {
1400
1401 // Return to Main Menu
1402 go_to(Enums::Screen::MAINMENU);
1403 } else if (component == "graveyard_return") {
1404
1405 // Return to Castle on a wipe
1406 go_to(Enums::Screen::CASTLE);
1407 } else if (component == "nolevelup_leave") {
1408
1409 // No Level Up Notice - Return to Inn
1410 go_to(Enums::Screen::INN);
1411 } else if (component == "levelup_leave") {
1412
1413 // No Level Up Notice - C Return to Inn
1414 go_to(Enums::Screen::INN);
1415 }
1416}
1417
1418// Menu Handling
1419auto Sorcery::Controller::handle_standard_menu(
1420 std::string_view component, const std::vector<std::string> &items,

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected