diff options
author | Paul Gilbert | 2015-04-02 19:19:36 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-04-02 19:19:36 -0400 |
commit | 91774a0aebb0b37010627e448a1ac18169cec07f (patch) | |
tree | b354f110eba1c18c46a052dc7e23f927d4de4e63 | |
parent | 9c24ae75909088742aae7b303f80de43cb31a7a6 (diff) | |
download | scummvm-rg350-91774a0aebb0b37010627e448a1ac18169cec07f.tar.gz scummvm-rg350-91774a0aebb0b37010627e448a1ac18169cec07f.tar.bz2 scummvm-rg350-91774a0aebb0b37010627e448a1ac18169cec07f.zip |
SHERLOCK: Implemented Journal::doButtons
-rw-r--r-- | engines/sherlock/journal.cpp | 24 | ||||
-rw-r--r-- | engines/sherlock/journal.h | 2 |
2 files changed, 23 insertions, 3 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index 94c6cf69e7..b45d772716 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -51,7 +51,7 @@ Journal::Journal(SherlockEngine *vm): _vm(vm) { _maxPage = 0; _index = 0; _sub = 0; - _up = _down = 0; + _up = _down = false; _page = 0; _converseNum = -1; @@ -504,8 +504,28 @@ void Journal::drawInterface() { screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); } +/** + * Display the arrows that can be used to scroll up and down pages + */ void Journal::doArrows() { - // TODO + Screen &screen = *_vm->_screen; + byte color; + + color = (_page > 1) ? COMMAND_FOREGROUND : COMMAND_NULL; + screen.buttonPrint(Common::Point(JOURNAL_POINTS[1][2], JOURNAL_BUTTONS_Y), color, false, "Back 10"); + screen.buttonPrint(Common::Point(JOURNAL_POINTS[2][2], JOURNAL_BUTTONS_Y), color, false, "Up"); + + color = _down ? COMMAND_FOREGROUND : COMMAND_NULL; + screen.buttonPrint(Common::Point(JOURNAL_POINTS[3][2], JOURNAL_BUTTONS_Y), color, false, "Down"); + screen.buttonPrint(Common::Point(JOURNAL_POINTS[4][2], JOURNAL_BUTTONS_Y), color, false, "Ahead 10"); + screen.buttonPrint(Common::Point(JOURNAL_POINTS[7][2], JOURNAL_BUTTONS_Y + 11), color, false, "Last Page"); + + color = _journal.size() > 0 ? COMMAND_FOREGROUND : COMMAND_NULL; + screen.buttonPrint(Common::Point(JOURNAL_POINTS[5][2], JOURNAL_BUTTONS_Y + 11), color, false, "Search"); + screen.buttonPrint(Common::Point(JOURNAL_POINTS[8][2], JOURNAL_BUTTONS_Y + 11), color, false, "Print Text"); + + color = _page > 1 ? COMMAND_FOREGROUND : COMMAND_NULL; + screen.buttonPrint(Common::Point(JOURNAL_POINTS[6][2], JOURNAL_BUTTONS_Y + 11), color, false, "First Page"); } void Journal::doJournal(int direction, int howFar) { diff --git a/engines/sherlock/journal.h b/engines/sherlock/journal.h index 34d99af0ec..8ad19dc0e5 100644 --- a/engines/sherlock/journal.h +++ b/engines/sherlock/journal.h @@ -53,7 +53,7 @@ private: int _maxPage; int _index; int _sub; - int _up, _down; + bool _up, _down; int _page; int _converseNum; |