diff options
author | Paul Gilbert | 2010-01-31 00:42:47 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-01-31 00:42:47 +0000 |
commit | dc8ff8c9d4405d5762a90ec2c69c5e7293581bce (patch) | |
tree | 70582cda19df7863dbe32a4a46561eb7de6a927a /engines/m4/m4_views.cpp | |
parent | 5b7d4305502dd02af32182541f60e82a3c3d1b26 (diff) | |
download | scummvm-rg350-dc8ff8c9d4405d5762a90ec2c69c5e7293581bce.tar.gz scummvm-rg350-dc8ff8c9d4405d5762a90ec2c69c5e7293581bce.tar.bz2 scummvm-rg350-dc8ff8c9d4405d5762a90ec2c69c5e7293581bce.zip |
Further work on separating the scene logic for MADS and M4
svn-id: r47732
Diffstat (limited to 'engines/m4/m4_views.cpp')
-rw-r--r-- | engines/m4/m4_views.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/m4/m4_views.cpp b/engines/m4/m4_views.cpp index 93ff74b879..3d633cef0d 100644 --- a/engines/m4/m4_views.cpp +++ b/engines/m4/m4_views.cpp @@ -127,7 +127,7 @@ bool GUIInventory::onEvent(M4EventType eventType, int32 param, int x, int y, GUI if (result) { for (int i = 0; i < overIndex + _scrollPosition; i++) ++curItem; - _vm->_interfaceView->setStatusText(curItem->get()->name); + _m4Vm->scene()->getInterface()->setStatusText(curItem->get()->name); } } @@ -218,8 +218,8 @@ const char *INTERFACE_SERIES = "999intr"; #define SPR(x) _sprites->getFrame(x) -GameInterfaceView::GameInterfaceView(MadsM4Engine *vm): - View(vm, Common::Rect(0, vm->_screen->height() - INTERFACE_HEIGHT, +M4InterfaceView::M4InterfaceView(MadsM4Engine *vm): + GameInterfaceView(vm, Common::Rect(0, vm->_screen->height() - INTERFACE_HEIGHT, vm->_screen->width(), vm->_screen->height())), _statusText(GUITextField(this, Common::Rect(200, 1, 450, 21))), _inventory(GUIInventory(this, vm, Common::Rect(188, 22, 539, 97), 9, 1, 39, 75, 3)) { @@ -256,11 +256,11 @@ GameInterfaceView::GameInterfaceView(MadsM4Engine *vm): #undef SPR -GameInterfaceView::~GameInterfaceView() { +M4InterfaceView::~M4InterfaceView() { delete _sprites; } -void GameInterfaceView::setHighlightedButton(int index) { +void M4InterfaceView::setHighlightedButton(int index) { if (index == _highlightedIndex) return; @@ -268,7 +268,7 @@ void GameInterfaceView::setHighlightedButton(int index) { _highlightedIndex = index; } -bool GameInterfaceView::onEvent(M4EventType eventType, int32 param, int x, int y, bool &captureEvents) { +bool M4InterfaceView::onEvent(M4EventType eventType, int32 param, int x, int y, bool &captureEvents) { static bool selectionFlag = false; if (eventType == MEVENT_LEFT_RELEASE) selectionFlag = false; @@ -287,7 +287,7 @@ bool GameInterfaceView::onEvent(M4EventType eventType, int32 param, int x, int y if (_vm->_mouse->getCursorNum() != CURSOR_LOOK && _vm->_mouse->getCursorNum() != CURSOR_TAKE && _vm->_mouse->getCursorNum() != CURSOR_USE && - _vm->_interfaceView->_inventory.getSelectedIndex() == -1) { + _m4Vm->scene()->getInterface()->_inventory.getSelectedIndex() == -1) { if (_vm->_mouse->getCursorNum() != 0) _vm->_mouse->setCursorNum(0); } @@ -330,7 +330,7 @@ bool GameInterfaceView::onEvent(M4EventType eventType, int32 param, int x, int y return true; } -void GameInterfaceView::onRefresh(RectList *rects, M4Surface *destSurface) { +void M4InterfaceView::onRefresh(RectList *rects, M4Surface *destSurface) { clear(); _statusText.onRefresh(); |