FULLPIPE: Implement ModalSaveGame::processMouse()

This commit is contained in:
Eugene Sandulenko 2014-04-30 07:34:01 +03:00
parent 2779e6825c
commit 8fde4cf50f
2 changed files with 23 additions and 0 deletions

View File

@ -1629,6 +1629,27 @@ bool ModalSaveGame::getFileInfo(char *filename, FileInfo *fileinfo) {
return false;
}
void ModalSaveGame::processMouse(int x, int y) {
for (uint i = 0; i < _files.size(); i++) {
if (x >= _files[i]->fx1 && x <= _files[i]->fx2 && y >= _files[i]->fy1 && y <= _files[i]->fy2) {
_queryRes = i + 1;
if (_mode) {
if (!_files[i]->empty) {
_queryDlg = new ModalQuery;
_queryDlg->create(_menuScene, 0, PIC_MOV_BGR);
}
}
return;
}
}
if (_cancelL->isPixelHitAtPos(x, y))
_queryRes = 0;
}
void FullpipeEngine::openHelp() {
if (!_modalObject) {
ModalHelp *help = new ModalHelp;

View File

@ -261,6 +261,8 @@ public:
virtual void update() {}
virtual void saveload() {}
void processMouse(int x, int y);
void setScene(Scene *sc);
void setup(Scene *sc, int mode);
void processKey(int key);