mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
ULTIMA4: Adding title skipping from mouse clicks
This commit is contained in:
parent
bfe395bbcf
commit
c5f6fb5f9a
@ -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 {
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user