From cd5bc0ec7ec7652a39d550aea4f387eec45fa382 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 18 Feb 2015 22:05:25 -0500 Subject: XEEN: Simplify use of addButton when setting up button lists --- engines/xeen/dialogs.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'engines/xeen/dialogs.cpp') 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); } } -- cgit v1.2.3