| 52 | } |
| 53 | |
| 54 | void Scene_Order::UpdateOrder() { |
| 55 | if (Input::IsTriggered(Input::CANCEL)) { |
| 56 | Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Cancel)); |
| 57 | if (actor_counter == 0) { |
| 58 | Scene::Pop(); |
| 59 | } else { |
| 60 | --actor_counter; |
| 61 | window_left->SetItemText(actors[actor_counter] - 1, Main_Data::game_party->GetActors()[actors[actor_counter] - 1]->GetName()); |
| 62 | window_right->SetItemText(actor_counter, ""); |
| 63 | actors[actor_counter] = 0; |
| 64 | } |
| 65 | } else if (Input::IsTriggered(Input::DECISION)) { |
| 66 | if (std::find(actors.begin(), actors.end(), window_left->GetIndex() + 1) != actors.end()) { |
| 67 | Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Cancel)); |
| 68 | } else { |
| 69 | Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Decision)); |
| 70 | window_left->SetItemText(window_left->GetIndex(), ""); |
| 71 | window_right->SetItemText(actor_counter, Main_Data::game_party->GetActors()[window_left->GetIndex()]->GetName()); |
| 72 | |
| 73 | actors[actor_counter] = window_left->GetIndex() + 1; |
| 74 | |
| 75 | ++actor_counter; |
| 76 | |
| 77 | // Display Confirm/Redo window |
| 78 | if (actor_counter == (int)Main_Data::game_party->GetActors().size()) { |
| 79 | window_left->SetIndex(-1); |
| 80 | window_left->SetActive(false); |
| 81 | window_confirm->SetIndex(0); |
| 82 | window_confirm->SetActive(true); |
| 83 | window_confirm->SetVisible(true); |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | void Scene_Order::UpdateConfirm() { |
| 90 | if (Input::IsTriggered(Input::CANCEL)) { |
nothing calls this directly
no test coverage detected