Permalink
Browse files

Merge pull request #964 from dorkster/bugfixes

Remove extra call to getColor in MenuEnemy & fix VALIGN_BOTTOM for labels
  • Loading branch information...
2 parents 93368c3 + 7b86d61 commit bd8e43a91750c9b5489435f168ba3275d829b656 @clintbellanger committed Sep 12, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/MenuEnemy.cpp
  2. +1 −1 src/WidgetLabel.h
View
@@ -137,11 +137,11 @@ void MenuEnemy::render() {
if (custom_text_pos) {
label.set(window_area.x+text_pos.x, window_area.y+text_pos.y, text_pos.justify, text_pos.valign, msg->get("%s level %d", enemy->stats.level, enemy->stats.name), color_normal);
} else {
- label.set(window_area.x+bar_pos.x+bar_pos.w/2, window_area.y+bar_pos.y-9, JUSTIFY_CENTER, VALIGN_CENTER, msg->get("%s level %d", enemy->stats.level, enemy->stats.name), color_normal);
+ label.set(window_area.x+bar_pos.x+bar_pos.w/2, window_area.y+bar_pos.y, JUSTIFY_CENTER, VALIGN_BOTTOM, msg->get("%s level %d", enemy->stats.level, enemy->stats.name), color_normal);
}
label.render();
- label.set(window_area.x+bar_pos.x+bar_pos.w/2, window_area.y+bar_pos.y+bar_pos.h/2, JUSTIFY_CENTER, VALIGN_CENTER, ss.str(), font->getColor("menu_normal"));
+ label.set(window_area.x+bar_pos.x+bar_pos.w/2, window_area.y+bar_pos.y+bar_pos.h/2, JUSTIFY_CENTER, VALIGN_CENTER, ss.str(), color_normal);
label.render();
}
View
@@ -31,7 +31,7 @@ FLARE. If not, see http://www.gnu.org/licenses/
const int VALIGN_CENTER = 0;
const int VALIGN_TOP = 1;
-const int VALIGN_BOTTOM = 1;
+const int VALIGN_BOTTOM = 2;
typedef struct LabelInfo {
int x,y;

0 comments on commit bd8e43a

Please sign in to comment.