diff options
author | Johannes Schickel | 2008-03-28 15:29:39 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-03-28 15:29:39 +0000 |
commit | 4ac08aa32ac251c885d2cb81f19ce25538c3fd9f (patch) | |
tree | 0877f3879157925ee38d9038173361fbf5740f8a /engines/kyra | |
parent | 006f879dd8dcc00bef791555cc29f286cdc338ed (diff) | |
download | scummvm-rg350-4ac08aa32ac251c885d2cb81f19ce25538c3fd9f.tar.gz scummvm-rg350-4ac08aa32ac251c885d2cb81f19ce25538c3fd9f.tar.bz2 scummvm-rg350-4ac08aa32ac251c885d2cb81f19ce25538c3fd9f.zip |
- fixed svn properties
- reenabled kyra1 layout calculation
svn-id: r31294
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/gui_v1.cpp | 12 | ||||
-rw-r--r-- | engines/kyra/gui_v1.h | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp index 5c8b382f14..c39d889741 100644 --- a/engines/kyra/gui_v1.cpp +++ b/engines/kyra/gui_v1.cpp @@ -472,8 +472,8 @@ int GUI_v1::buttonMenuCallback(Button *caller) { return 0; } -/*void KyraEngine_v1::initMenuLayout(Menu &menu) { - assert(menu.nrOfItems < 7); +void GUI_v1::initMenuLayout(Menu &menu) { + assert(menu.numberOfItems < 7); int widthBackup = _screen->_charWidth; _screen->_charWidth = -2; @@ -484,9 +484,11 @@ int GUI_v1::buttonMenuCallback(Button *caller) { int maxOffset = 0; int x1, x2, y1, y2; - for (int i = 0; i < menu.nrOfItems; i++) { + for (int i = 0; i < menu.numberOfItems; i++) { if (menu.item[i].x == -1) menu.item[i].x = (menu.width - menu.item[i].width)/2; + if (menu.item[i].y == -1) + menu.item[i].y = (menu.height - menu.item[i].height)/2; if (menu.item[i].labelString) { x1 = menu.x + menu.item[i].x + 25; @@ -520,7 +522,7 @@ int GUI_v1::buttonMenuCallback(Button *caller) { if (maxOffset > 0) { maxOffset = maxOffset/2; - for (int i = 0; i < menu.nrOfItems; i++) { + for (int i = 0; i < menu.numberOfItems; i++) { menu.item[i].x += maxOffset + 10; menu.item[i].labelX -= maxOffset; } @@ -542,7 +544,7 @@ int GUI_v1::buttonMenuCallback(Button *caller) { menu.y = (200 - menu.height)/2; _screen->_charWidth = widthBackup; -}*/ +} void GUI_v1::getInput() { Common::Event event; diff --git a/engines/kyra/gui_v1.h b/engines/kyra/gui_v1.h index b4376a14f3..1819a85d18 100644 --- a/engines/kyra/gui_v1.h +++ b/engines/kyra/gui_v1.h @@ -96,6 +96,8 @@ public: int processButtonList(Button *buttonList, uint16 inputFlags); int buttonMenuCallback(Button *caller); + + void initMenuLayout(Menu &menu); private: void initStaticResource(); |