void DialogueSupervisor::ForceNextLine() { if (_current_dialogue == NULL) { IF_PRINT_WARNING(BATTLE_DEBUG) << "function called when no dialogue was active" << std::endl; return; } _EndLine(); }
void DialogueSupervisor::_UpdateLine() { _dialogue_window.GetDisplayTextBox().Update(); if (_current_options != NULL) { if (_dialogue_window.GetDisplayTextBox().IsFinished() == true) { _state = DIALOGUE_STATE_OPTION; return; } } // If the line has a valid display time and the timer is finished, move on to the next line if ((_line_timer.GetDuration() > 0) && (_line_timer.IsFinished() == true)) { _EndLine(); return; } // Set the correct indicator if (_current_dialogue->IsHaltBattleAction() == false || _current_options != NULL || _dialogue_window.GetDisplayTextBox().IsFinished() == false) { _dialogue_window.SetIndicator(COMMON_DIALOGUE_NO_INDICATOR); } else if (_line_counter == _current_dialogue->GetLineCount()-1) { _dialogue_window.SetIndicator(COMMON_DIALOGUE_LAST_INDICATOR); } else { _dialogue_window.SetIndicator(COMMON_DIALOGUE_NEXT_INDICATOR); } // If this dialogue does not halt the battle action, user input is not processed so we are finished if (_current_dialogue->IsHaltBattleAction() == false) { return; } if (InputManager->ConfirmPress()) { // If the line is not yet finished displaying, display the rest of the text if (_dialogue_window.GetDisplayTextBox().IsFinished() == false) { _dialogue_window.GetDisplayTextBox().ForceFinish(); } // Proceed to option selection if the line has options else if (_current_options != NULL) { _state = DIALOGUE_STATE_OPTION; } else { _EndLine(); } } }
void DialogueSupervisor::_UpdateLine() { _dialogue_window.GetDisplayTextBox().Update(); if(_current_options != nullptr) { if(_dialogue_window.GetDisplayTextBox().IsFinished() == true) { _state = DIALOGUE_STATE_OPTION; return; } } // If the line has a valid display time and the timer is finished, move on to the next line if((_line_timer.GetDuration() > 0) && (_line_timer.IsFinished() == true)) { _EndLine(); return; } // Set the correct indicator if(_current_options || !_dialogue_window.GetDisplayTextBox().IsFinished()) { _dialogue_window.SetIndicator(DIALOGUE_NO_INDICATOR); } else if(_line_counter == _current_dialogue->GetLineCount() - 1) { _dialogue_window.SetIndicator(DIALOGUE_LAST_INDICATOR); } else { _dialogue_window.SetIndicator(DIALOGUE_NEXT_INDICATOR); } // If the current mode is accepting input, we can handle it. if (!vt_mode_manager::ModeManager->GetTop()->AcceptUserInputInDialogues()) return; if(vt_input::InputManager->ConfirmPress()) { // If the line is not yet finished displaying, display the rest of the text if(_dialogue_window.GetDisplayTextBox().IsFinished() == false) { _dialogue_window.GetDisplayTextBox().ForceFinish(); } // Proceed to option selection if the line has options else if(_current_options != nullptr) { _state = DIALOGUE_STATE_OPTION; } else { _EndLine(); } } }
void DialogueSupervisor::_UpdateOptions() { _dialogue_window.GetDisplayOptionBox().Update(); if (InputManager->ConfirmPress()) { _dialogue_window.GetDisplayOptionBox().InputConfirm(); _EndLine(); } else if (InputManager->UpPress()) { _dialogue_window.GetDisplayOptionBox().InputUp(); } else if (InputManager->DownPress()) { _dialogue_window.GetDisplayOptionBox().InputDown(); } }