diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-15 23:05:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-15 23:05:16 +0300 |
commit | b162094c7609fa37f2eef6be3fed0e26830bc506 (patch) | |
tree | 072b83f0ce6b7f871acd9a2d2c6c49b8dac7dc64 /src/gui/widgets/avatarlistbox.cpp | |
parent | 4031a5068859fb99f604dfecceb2fb1c954e166f (diff) | |
download | mv-b162094c7609fa37f2eef6be3fed0e26830bc506.tar.gz mv-b162094c7609fa37f2eef6be3fed0e26830bc506.tar.bz2 mv-b162094c7609fa37f2eef6be3fed0e26830bc506.tar.xz mv-b162094c7609fa37f2eef6be3fed0e26830bc506.zip |
Improve a bit widgets speed.
Diffstat (limited to 'src/gui/widgets/avatarlistbox.cpp')
-rw-r--r-- | src/gui/widgets/avatarlistbox.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index 8de202120..1301d4a2e 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -64,7 +64,7 @@ AvatarListBox::AvatarListBox(AvatarListModel *const model) : config.addListener("showgender", this); config.addListener("showlevel", this); - setForegroundColor(Theme::getThemeColor(Theme::TEXT)); + mForegroundColor = Theme::getThemeColor(Theme::TEXT); } AvatarListBox::~AvatarListBox() @@ -112,7 +112,7 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics) const std::string name = player_node->getName(); // Draw the list elements - graphics->setColor(getForegroundColor()); + graphics->setColor(mForegroundColor); for (int i = 0, y = 0; i < model->getNumberOfElements(); ++i, y += fontHeight) @@ -186,7 +186,7 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics) if (a->getLevel() > 1) { - graphics->setColor(getForegroundColor()); + graphics->setColor(mForegroundColor); int minHp = 40 + ((a->getLevel() - 1) * 5); if (minHp < 0) minHp = 40; @@ -263,7 +263,7 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics) } } - graphics->setColor(getForegroundColor()); + graphics->setColor(mForegroundColor); // Draw Name if (a->getType() == MapItem::SEPARATOR) |