diff options
author | Paul Gilbert | 2014-03-16 17:50:47 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-03-16 17:50:47 -0400 |
commit | 39a36064ac91ad7864c04dfe4d88c97824f070ae (patch) | |
tree | 245f7e760c8a5567eb6ac168ef59ba1cf2dc2039 /engines/mads/user_interface.cpp | |
parent | 4dd057edd93bdb121cd046bfc1b2d770c5c0dbc4 (diff) | |
download | scummvm-rg350-39a36064ac91ad7864c04dfe4d88c97824f070ae.tar.gz scummvm-rg350-39a36064ac91ad7864c04dfe4d88c97824f070ae.tar.bz2 scummvm-rg350-39a36064ac91ad7864c04dfe4d88c97824f070ae.zip |
MADS: In progress text draw methods for user interface
Diffstat (limited to 'engines/mads/user_interface.cpp')
-rw-r--r-- | engines/mads/user_interface.cpp | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index 3b3fc9379a..9cff2217c1 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -41,6 +41,7 @@ UserInterface::UserInterface(MADSEngine *vm) : _vm(vm) { _screenObjectsCount = 0; _inventoryTopIndex = 0; _objectY = 0; + _selectedObject = -1; byte *pData = _vm->_screen.getBasePtr(0, MADS_SCENE_HEIGHT); setPixels(pData, MADS_SCREEN_WIDTH, MADS_INTERFACE_HEIGHT); @@ -106,7 +107,7 @@ void UserInterface::setup(int id) { scene._imageInterEntries.call(0, 0); scene._action.clear(); - writeText(); + drawTextElements(); loadElements(); scene._dynamicHotspots.refresh(); } @@ -115,10 +116,38 @@ void UserInterface::elementHighlighted() { warning("TODO: UserInterface::elementHighlighted"); } -void UserInterface::writeText() { - warning("TODO: UserInterface::writeText"); +void UserInterface::drawTextElements() { + Scene &scene = _vm->_game->_scene; + if (scene._screenObjects._v832EC) { + drawTalkList(); + } else { + // Draw the actions + drawActions(); + drawInventoryList(); + drawItemVocabList(); + } +} + +void UserInterface::drawActions() { + for (int idx = 0; idx < 10; ++idx) { + drawVocab(CAT_ACTION, idx); + } +} + +void UserInterface::drawInventoryList() { + int endIndex = MIN((int)_vm->_game->_objects._inventoryList.size(), _inventoryTopIndex + 5); + for (int idx = _inventoryTopIndex; idx < endIndex; ++idx) { + drawVocab(CAT_INV_LIST, idx); + } } +void UserInterface::drawItemVocabList() { + +} + +void UserInterface::drawVocab(ScrCategory category, int id) { + +} void UserInterface::setBounds(const Common::Rect &r) { _bounds = r; @@ -273,4 +302,9 @@ void UserInterface::moveRect(Common::Rect &bounds) { bounds.translate(0, MADS_SCENE_HEIGHT); } +void UserInterface::drawTalkList() { + warning("TODO: drawTalkList"); +} + + } // End of namespace MADS |