From 4f496b868108e67a135933c6127b9bedc38543b1 Mon Sep 17 00:00:00 2001 From: darkvater Date: Tue, 4 Jan 2005 14:54:27 +0000 Subject: [PATCH] (svn r1369) -Feature(ish): Added sprites for up/down and left/right arrows. Anywhere where there are horizontal scrollers these are now left/right arrows --- data/openttd.grf | Bin 23069 -> 23244 bytes spritecache.c | 2 +- table/sprites.h | 5 +++++ widget.c | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/data/openttd.grf b/data/openttd.grf index cceea1bdf6f02c84e9bdda9e050eee6fd09e5528..d67107ea984409a85a76744006c5d630adb6ff74 100644 GIT binary patch delta 192 zcmZ9`Jqp4=5C!13KVh>3C5jp`3O0iF;$ggum`%tjyn}__!oqG+rkrCq*(Tt0GxN=3 z9xwHIt7mb&9pSCRP?Hohtg%B2B4T5xQJvR8b8ha2MmSHAAx8n31}(NxoLHh3os;$q v?`%xmP9<@P4fZ(TH1JCHLCHxCPQF>cxNtf8)t?7d@=9Qvjg delta 16 UcmX@Jm2vJC#tq_8Yz$xk05X;X`~Uy| diff --git a/spritecache.c b/spritecache.c index 3d149467a3..8ea8b0411b 100644 --- a/spritecache.c +++ b/spritecache.c @@ -743,7 +743,7 @@ static const char * const _cached_filenames[4] = { "cached_sprites.xx3", }; -#define OPENTTD_SPRITES_COUNT 94 +#define OPENTTD_SPRITES_COUNT 98 static const uint16 _openttd_grf_indexes[] = { SPR_OPENTTD_BASE+0, SPR_OPENTTD_BASE+7, // icons etc 134, 134, // euro symbol medium size diff --git a/table/sprites.h b/table/sprites.h index 5adbd731c6..d56dc82170 100644 --- a/table/sprites.h +++ b/table/sprites.h @@ -51,6 +51,11 @@ enum Sprites { SPR_PIN_UP = SPR_OPENTTD_BASE + 62, // pin icon SPR_PIN_DOWN = SPR_OPENTTD_BASE + 63, SPR_WINDOW_RESIZE = SPR_OPENTTD_BASE + 94, // resize icon + // arrow icons pointing in all 4 directions + SPR_ARROW_DOWN = SPR_OPENTTD_BASE + 95, + SPR_ARROW_UP = SPR_OPENTTD_BASE + 96, + SPR_ARROW_LEFT = SPR_OPENTTD_BASE + 97, + SPR_ARROW_RIGHT = SPR_OPENTTD_BASE + 98, /* Network GUI sprites */ diff --git a/widget.c b/widget.c index e64adbae2a..e95cc76a2a 100644 --- a/widget.c +++ b/widget.c @@ -337,8 +337,8 @@ void DrawWindowWidgets(Window *w) DrawFrameRect(r.right-9, r.top, r.right, r.bottom, wi->color, (w->flags4 & (WF_SCROLL_DOWN | WF_HSCROLL)) == (WF_SCROLL_DOWN | WF_HSCROLL) ? 0x20 : 0); // draw icons in up/down buttons - DoDrawString("\xA0", r.left+1, r.top+1, 0x10); - DoDrawString("\xAA", r.right-8, r.top+1, 0x10); + DrawSprite(SPR_ARROW_LEFT, r.left + 3, r.top + 2); + DrawSprite(SPR_ARROW_RIGHT, r.right - 6, r.top + 2); c1 = _color_list[wi->color&0xF].window_color_1a; c2 = _color_list[wi->color&0xF].window_color_2;