summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 3c3cd6cfe..d70872b04 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -187,8 +187,7 @@ public:
switch (widget) {
case TWA_ACTION_INFO:
if (this->sel_index != -1) {
- SetDParam(1, _price[PR_TOWN_ACTION] * _town_action_costs[this->sel_index] >> 8);
- SetDParam(0, STR_LOCAL_AUTHORITY_ACTION_SMALL_ADVERTISING_CAMPAIGN + this->sel_index);
+ SetDParam(0, _price[PR_TOWN_ACTION] * _town_action_costs[this->sel_index] >> 8);
DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom - WD_FRAMERECT_BOTTOM,
STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_SMALL_ADVERTISING + this->sel_index);
}
@@ -208,7 +207,8 @@ public:
if (pos <= -5) break; ///< Draw only the 5 fitting lines
if ((buttons & 1) && --pos < 0) {
- DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_LOCAL_AUTHORITY_ACTION_SMALL_ADVERTISING_CAMPAIGN + i, TC_ORANGE);
+ DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y,
+ STR_LOCAL_AUTHORITY_ACTION_SMALL_ADVERTISING_CAMPAIGN + i, this->sel_index == i ? TC_WHITE : TC_ORANGE);
y += FONT_HEIGHT_NORMAL;
}
}
@@ -226,8 +226,7 @@ public:
size->height -= WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
Dimension d = {0, 0};
for (int i = 0; i < TACT_COUNT; i++) {
- SetDParam(1, _price[PR_TOWN_ACTION] * _town_action_costs[i] >> 8);
- SetDParam(0, STR_LOCAL_AUTHORITY_ACTION_SMALL_ADVERTISING_CAMPAIGN + i);
+ SetDParam(0, _price[PR_TOWN_ACTION] * _town_action_costs[i] >> 8);
d = maxdim(d, GetStringMultiLineBoundingBox(STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_SMALL_ADVERTISING + i, *size));
}
*size = maxdim(*size, d);