diff options
author | Paul Gilbert | 2015-02-18 22:05:25 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-02-18 22:05:25 -0500 |
commit | cd5bc0ec7ec7652a39d550aea4f387eec45fa382 (patch) | |
tree | 113aff8f3c36ddfdaf67b73a1edb03c79e58306c /engines/xeen/dialogs.cpp | |
parent | aa89e602a2d261a24861bf65877bba3fab647409 (diff) | |
download | scummvm-rg350-cd5bc0ec7ec7652a39d550aea4f387eec45fa382.tar.gz scummvm-rg350-cd5bc0ec7ec7652a39d550aea4f387eec45fa382.tar.bz2 scummvm-rg350-cd5bc0ec7ec7652a39d550aea4f387eec45fa382.zip |
XEEN: Simplify use of addButton when setting up button lists
Diffstat (limited to 'engines/xeen/dialogs.cpp')
-rw-r--r-- | engines/xeen/dialogs.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/xeen/dialogs.cpp b/engines/xeen/dialogs.cpp index 8bb0af0833..116054dfe7 100644 --- a/engines/xeen/dialogs.cpp +++ b/engines/xeen/dialogs.cpp @@ -47,14 +47,19 @@ void ButtonContainer::restoreButtons() { _buttons = _savedButtons.pop(); } -void ButtonContainer::addButton(const Common::Rect &bounds, int val, SpriteResource *sprites, bool draw) { - _buttons.push_back(UIButton(bounds, val, sprites, draw)); +void ButtonContainer::addButton(const Common::Rect &bounds, int val, + SpriteResource *sprites) { + _buttons.push_back(UIButton(bounds, val, sprites, true)); +} + +void ButtonContainer::addButton(const Common::Rect &bounds, int val) { + _buttons.push_back(UIButton(bounds, val, nullptr, false)); } void ButtonContainer::addPartyButtons(XeenEngine *vm) { for (uint idx = 0; idx < MAX_ACTIVE_PARTY; ++idx) { addButton(Common::Rect(CHAR_FACES_X[idx], 150, CHAR_FACES_X[idx] + 32, 182), - Common::KEYCODE_F1 + idx, nullptr, false); + Common::KEYCODE_F1 + idx); } } |