diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-06 14:02:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-06 14:12:59 +0300 |
commit | 73e7be1617217396c5f1eead52af87bc7fef2357 (patch) | |
tree | b985dfd5f1173a6c7e1c741c796a4a61de0cefa8 /src/gui/widgets/listbox.cpp | |
parent | 5ffbb0ca66337bd13a21a1875cc5bec5cc9a724d (diff) | |
download | mv-73e7be1617217396c5f1eead52af87bc7fef2357.tar.gz mv-73e7be1617217396c5f1eead52af87bc7fef2357.tar.bz2 mv-73e7be1617217396c5f1eead52af87bc7fef2357.tar.xz mv-73e7be1617217396c5f1eead52af87bc7fef2357.zip |
add colors tab into chat emotes window.
Diffstat (limited to 'src/gui/widgets/listbox.cpp')
-rw-r--r-- | src/gui/widgets/listbox.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index e5229eca6..4d05e496e 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -103,22 +103,18 @@ void ListBox::draw(gcn::Graphics *graphics) graphics->fillRectangle(gcn::Rectangle(mPadding, rowHeight * mSelected + mPadding, mDimension.width - 2 * mPadding, rowHeight)); - } - const int sel = getSelected(); - if (sel >= 0) - { g->setColorAll(mForegroundSelectedColor, mForegroundSelectedColor2); - font->drawString(graphics, mListModel->getElementAt(sel), - mPadding, sel * rowHeight + mPadding); + font->drawString(graphics, mListModel->getElementAt(mSelected), + mPadding, mSelected * rowHeight + mPadding); } // Draw the list elements g->setColorAll(mForegroundColor, mForegroundColor2); const int sz = mListModel->getNumberOfElements(); for (int i = 0, y = mPadding; i < sz; ++i, y += rowHeight) { - if (i != sel) + if (i != mSelected) { font->drawString(graphics, mListModel->getElementAt(i), mPadding, y); |