|
@@ -89,13 +89,13 @@ static void LandInfoWndProc(Window *w, W
|
|
|
SetDParam(1, lid->town->index);
|
|
|
}
|
|
|
DrawStringCentered(140,60, STR_01A8_LOCAL_AUTHORITY, 0);
|
|
|
|
|
|
{
|
|
|
char buf[512];
|
|
|
char *p = GetString(buf, STR_01CE_CARGO_ACCEPTED);
|
|
|
char *p = GetString(buf, STR_01CE_CARGO_ACCEPTED, lastof(buf));
|
|
|
bool found = false;
|
|
|
|
|
|
for (i = 0; i < NUM_CARGO; ++i) {
|
|
|
if (lid->ac[i] > 0) {
|
|
|
// Add a comma between each item.
|
|
|
if (found) {
|
|
@@ -105,15 +105,15 @@ static void LandInfoWndProc(Window *w, W
|
|
|
found = true;
|
|
|
|
|
|
// If the accepted value is less than 8, show it in 1/8:ths
|
|
|
if (lid->ac[i] < 8) {
|
|
|
SetDParam(0, lid->ac[i]);
|
|
|
SetDParam(1, _cargoc.names_s[i]);
|
|
|
p = GetString(p, STR_01D1_8);
|
|
|
p = GetString(p, STR_01D1_8, lastof(buf));
|
|
|
} else {
|
|
|
p = GetString(p, _cargoc.names_s[i]);
|
|
|
p = GetString(p, _cargoc.names_s[i], lastof(buf));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (found) DrawStringMultiCenter(140, 76, BindCString(buf), 276);
|
|
|
}
|
|
@@ -676,13 +676,13 @@ void GuiShowTooltipsWithArgs(StringID st
|
|
|
DeleteWindowById(WC_TOOLTIPS, 0);
|
|
|
|
|
|
/* We only show measurement tooltips with patch setting on */
|
|
|
if (str == STR_NULL || (paramcount != 0 && !_patches.measure_tooltip)) return;
|
|
|
|
|
|
for (i = 0; i != paramcount; i++) SetDParam(i, params[i]);
|
|
|
GetString(buffer, str);
|
|
|
GetString(buffer, str, lastof(buffer));
|
|
|
|
|
|
br = GetStringBoundingBox(buffer);
|
|
|
br.width += 6; br.height += 4; // increase slightly to have some space around the box
|
|
|
|
|
|
/* Cut tooltip length to 200 pixels max, wrap to new line if longer */
|
|
|
if (br.width > 200) {
|
|
@@ -1073,13 +1073,13 @@ void ShowQueryString(StringID str, Strin
|
|
|
|
|
|
DeleteWindowById(WC_QUERY_STRING, 0);
|
|
|
DeleteWindowById(WC_SAVELOAD, 0);
|
|
|
|
|
|
w = AllocateWindowDesc(&_query_string_desc);
|
|
|
|
|
|
GetString(_edit_str_buf, str);
|
|
|
GetString(_edit_str_buf, str, lastof(_edit_str_buf));
|
|
|
_edit_str_buf[realmaxlen-1] = '\0';
|
|
|
|
|
|
if (maxlen & 0x1000) {
|
|
|
WP(w, querystr_d).orig = NULL;
|
|
|
} else {
|
|
|
strcpy(_orig_str_buf, _edit_str_buf);
|
|
@@ -1308,13 +1308,13 @@ static void GenerateFileName(void)
|
|
|
Let's use the name of player #0 for now. */
|
|
|
const Player *p = GetPlayer(IsValidPlayer(_local_player) ? _local_player : 0);
|
|
|
|
|
|
SetDParam(0, p->name_1);
|
|
|
SetDParam(1, p->name_2);
|
|
|
SetDParam(2, _date);
|
|
|
GetString(_edit_str_buf, STR_4004);
|
|
|
GetString(_edit_str_buf, STR_4004, lastof(_edit_str_buf));
|
|
|
}
|
|
|
|
|
|
extern void StartupEngines(void);
|
|
|
|
|
|
static void SaveLoadDlgWndProc(Window *w, WindowEvent *e)
|
|
|
{
|
|
@@ -1774,13 +1774,13 @@ static void CheatsWndProc(Window *w, Win
|
|
|
switch (ce->str) {
|
|
|
/* Display date for change date cheat */
|
|
|
case STR_CHEAT_CHANGE_DATE: SetDParam(0, _date); break;
|
|
|
/* Draw colored flag for change player cheat */
|
|
|
case STR_CHEAT_CHANGE_PLAYER:
|
|
|
SetDParam(0, val);
|
|
|
GetString(buf, STR_CHEAT_CHANGE_PLAYER);
|
|
|
GetString(buf, STR_CHEAT_CHANGE_PLAYER, lastof(buf));
|
|
|
DrawPlayerIcon(_current_player, 60 + GetStringBoundingBox(buf).width, y + 2);
|
|
|
break;
|
|
|
/* Set correct string for switch climate cheat */
|
|
|
case STR_CHEAT_SWITCH_CLIMATE: val += STR_TEMPERATE_LANDSCAPE;
|
|
|
/* Fallthrough */
|
|
|
default: SetDParam(0, val);
|