ULTIMA4: Adding title skipping from mouse clicks

This commit is contained in:
Paul Gilbert 2020-05-02 18:35:28 -07:00
parent bfe395bbcf
commit c5f6fb5f9a
3 changed files with 35 additions and 1 deletions

View File

@ -139,6 +139,16 @@ public:
Controller_startWait();
return getValue();
}
/**
* Mouse button was pressed
*/
virtual bool mousePressed(const Common::Point &mousePos) {
// Treat mouse clicks as an abort
doneWaiting();
return true;
}
};
class TurnCompleter {

View File

@ -360,7 +360,6 @@ bool IntroController::keyPressed(int key) {
bool valid = true;
switch (_mode) {
case INTRO_TITLES:
// the user pressed a key to abort the sequence
skipTitles();
@ -428,6 +427,25 @@ bool IntroController::keyPressed(int key) {
return valid || KeyHandler::defaultHandler(key, nullptr);
}
bool IntroController::mousePressed(const Common::Point &mousePos) {
switch (_mode) {
case INTRO_TITLES:
// Finish the title sequence
skipTitles();
break;
case INTRO_MAP:
_mode = INTRO_MENU;
updateScreen();
break;
default:
break;
}
return true;
}
void IntroController::drawMap() {
if (0 && _sleepCycles > 0) {
drawMapStatic();

View File

@ -99,6 +99,12 @@ public:
* Handles keystrokes during the introduction.
*/
bool keyPressed(int key);
/**
* Mouse button was pressed
*/
bool mousePressed(const Common::Point &mousePos) override;
byte *getSigData();
/**