summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-22 19:27:51 +0000
committerrubidium <rubidium@openttd.org>2009-11-22 19:27:51 +0000
commitbd0d32a0b6c37c29d8e4e7753e639cccba38cb4b (patch)
tree86c84b3661e6d8dc64969bbab8011099edfe022b
parent48d1718671b6a098717ab706167309fb64f97f19 (diff)
downloadopenttd-bd0d32a0b6c37c29d8e4e7753e639cccba38cb4b.tar.xz
(svn r18240) -Change: align the 'select' sprite in the network content GUI based on the font height
-rw-r--r--src/network/network_content_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index ddcd19ebc..1fefe925d 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -445,6 +445,7 @@ public:
/* Fill the matrix with the information */
+ int sprite_y_offset = WD_MATRIX_TOP + (FONT_HEIGHT_NORMAL - 10) / 2;
uint y = r.top;
int cnt = 0;
for (ConstContentIterator iter = this->content.Get(this->vscroll.GetPosition()); iter != this->content.End() && cnt < this->vscroll.GetCapacity(); iter++, cnt++) {
@@ -462,7 +463,7 @@ public:
case ContentInfo::DOES_NOT_EXIST: sprite = SPR_BLOT; pal = PALETTE_TO_RED; break;
default: NOT_REACHED();
}
- DrawSprite(sprite, pal, nwi_checkbox->pos_x + (pal == PAL_NONE ? 2 : 3), y + WD_MATRIX_TOP + (pal == PAL_NONE ? 1 : 0));
+ DrawSprite(sprite, pal, nwi_checkbox->pos_x + (pal == PAL_NONE ? 2 : 3), y + sprite_y_offset + (pal == PAL_NONE ? 1 : 0));
StringID str = STR_CONTENT_TYPE_BASE_GRAPHICS + ci->type - CONTENT_TYPE_BASE_GRAPHICS;
DrawString(nwi_type->pos_x, nwi_type->pos_x + nwi_type->current_x - 1, y + WD_MATRIX_TOP, str, TC_BLACK, SA_CENTER);