aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui
diff options
context:
space:
mode:
authorMartin Kiewitz2009-11-12 08:28:59 +0000
committerMartin Kiewitz2009-11-12 08:28:59 +0000
commitc8f1afd24cfbb53b7e96c8ad376672092b9fa42f (patch)
tree18f02464aa3fa934da95a31448eaebe2d71184d9 /engines/sci/gui
parente36594dbe90c36d09e2c3c2d31b11476c5ddffbd (diff)
downloadscummvm-rg350-c8f1afd24cfbb53b7e96c8ad376672092b9fa42f.tar.gz
scummvm-rg350-c8f1afd24cfbb53b7e96c8ad376672092b9fa42f.tar.bz2
scummvm-rg350-c8f1afd24cfbb53b7e96c8ad376672092b9fa42f.zip
SCI/newgui: changed behaviour of menu when left/right to follow sierra. Added other differences in implementation, added reanimate TODOs, added mouse interaction TODO
svn-id: r45853
Diffstat (limited to 'engines/sci/gui')
-rw-r--r--engines/sci/gui/gui_menu.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/sci/gui/gui_menu.cpp b/engines/sci/gui/gui_menu.cpp
index 8631651708..1521e044e5 100644
--- a/engines/sci/gui/gui_menu.cpp
+++ b/engines/sci/gui/gui_menu.cpp
@@ -382,6 +382,7 @@ reg_t SciGuiMenu::select(reg_t eventObject) {
if (!_menuSaveHandle.isNull()) {
_gfx->BitsRestore(_menuSaveHandle);
_gfx->BitsShow(_menuRect);
+ // TODO: Change to ReAnimate()
}
if (!_barSaveHandle.isNull()) {
_gfx->BitsRestore(_barSaveHandle);
@@ -443,6 +444,7 @@ void SciGuiMenu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
if (!_menuSaveHandle.isNull()) {
_gfx->BitsRestore(_menuSaveHandle);
_gfx->BitsShow(_menuRect);
+ // TODO: Change to ReAnimate()
}
// First calculate rect of menu and also invert old and new menu text
@@ -539,6 +541,8 @@ GuiMenuItemEntry *SciGuiMenu::interactiveWithKeyboard() {
GuiMenuItemEntry *curItemEntry = findItem(_curMenuId, _curItemId);
GuiMenuItemEntry *newItemEntry = curItemEntry;
+ // We don't 100% follow sierra here: we select last item instead of selecting first item of first menu everytime
+
calculateTextWidth();
_oldPort = _gfx->SetPort(_gfx->_menuPort);
_barSaveHandle = _gfx->BitsSave(_gfx->_menuBarRect, SCI_SCREEN_MASK_VISUAL);
@@ -557,7 +561,8 @@ GuiMenuItemEntry *SciGuiMenu::interactiveWithKeyboard() {
switch (curEvent.type) {
case SCI_EVT_KEYBOARD:
- // We don't 100% follow sierra here, sierra actually changed itemId to 1 on menuId changes
+ // We don't 100% follow sierra here: - sierra didn't wrap around when changing item id
+ // - sierra allowed item id to be 0, which didnt make any sense
do {
switch (curEvent.data) {
case SCI_K_ESC:
@@ -567,10 +572,10 @@ GuiMenuItemEntry *SciGuiMenu::interactiveWithKeyboard() {
_curMenuId = curItemEntry->menuId; _curItemId = curItemEntry->id;
return curItemEntry;
case SCI_K_LEFT:
- newMenuId--;
+ newMenuId--; newItemId = 1;
break;
case SCI_K_RIGHT:
- newMenuId++;
+ newMenuId++; newItemId = 1;
break;
case SCI_K_UP:
newItemId--;
@@ -616,6 +621,8 @@ GuiMenuItemEntry *SciGuiMenu::interactiveWithKeyboard() {
GuiMenuItemEntry *SciGuiMenu::interactiveWithMouse() {
calculateTextWidth();
+ // TODO
+
return NULL;
}