summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-03 14:22:59 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-03 14:22:59 +0000
commit790d0b170320ffba5e5bd0d5bdc4ca21e79926b9 (patch)
treec8264ac8cfcd455980c548dd7cdea3b422d87110
parentd50896be6337e0574d6de03aa08bfe08261524c6 (diff)
downloadopenttd-790d0b170320ffba5e5bd0d5bdc4ca21e79926b9.tar.xz
(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)
-rw-r--r--aircraft_gui.c6
-rw-r--r--lang/english.txt2
-rw-r--r--ship_gui.c6
3 files changed, 4 insertions, 10 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index cb3e9671c..68f5142b8 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 08e332275..a7907a505 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 e4eec8efc..ee02af483 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) {