From 790d0b170320ffba5e5bd0d5bdc4ca21e79926b9 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 3 May 2006 14:22:59 +0000 Subject: [PATCH] (svn r4709) - Codechange: avoid messing around with globals, magic numbers and literal strings by using a string ID, when drawing the small right arrow for the small order lists (aircraft and ships) --- aircraft_gui.c | 6 +----- lang/english.txt | 2 ++ ship_gui.c | 6 +----- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/aircraft_gui.c b/aircraft_gui.c index cb3e9671c6..68f5142b8b 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -927,11 +927,7 @@ static void DrawSmallOrderList(const Vehicle *v, int x, int y) { sel = v->cur_order_index; FOR_VEHICLE_ORDERS(v, order) { - if (sel == 0) { - _stringwidth_base = 0xE0; - DoDrawString( "\xAF", x-6, y, 16); - _stringwidth_base = 0; - } + if (sel == 0) DrawString(x - 6, y, STR_SMALL_RIGHT_ARROW, 16); sel--; if (order->type == OT_GOTO_STATION) { diff --git a/lang/english.txt b/lang/english.txt index 08e3322750..a7907a505c 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -944,6 +944,8 @@ STR_CRATES :crates STR_RES_OTHER :other STR_NOTHING : +STR_SMALL_RIGHT_ARROW :{TINYFONT}{RIGHTARROW} + STR_CANT_SHARE_ORDER_LIST :{WHITE}Can't share order list... STR_CANT_COPY_ORDER_LIST :{WHITE}Can't copy order list... STR_END_OF_SHARED_ORDERS :{SETX 10}- - End of Shared Orders - - diff --git a/ship_gui.c b/ship_gui.c index e4eec8efc7..ee02af4838 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -910,11 +910,7 @@ static void DrawSmallOrderList(const Vehicle* v, int x, int y) sel = v->cur_order_index; FOR_VEHICLE_ORDERS(v, order) { - if (sel == 0) { - _stringwidth_base = 0xE0; - DoDrawString("\xAF", x - 6, y, 16); - _stringwidth_base = 0; - } + if (sel == 0) DrawString(x - 6, y, STR_SMALL_RIGHT_ARROW, 16); sel--; if (order->type == OT_GOTO_STATION) {