mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r17654) -Fix [FS#3220] (r17612): the edit box of the town fund window wasn't updated properly (based on patch of Terkhen)
This commit is contained in:
parent
8a21979b42
commit
09124e2186
|
@ -969,6 +969,7 @@ public:
|
||||||
params(_settings_game.game_creation.town_name)
|
params(_settings_game.game_creation.town_name)
|
||||||
{
|
{
|
||||||
this->InitNested(desc, window_number);
|
this->InitNested(desc, window_number);
|
||||||
|
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, MAX_LENGTH_TOWN_NAME_PIXELS);
|
||||||
this->RandomTownName();
|
this->RandomTownName();
|
||||||
this->UpdateButtons();
|
this->UpdateButtons();
|
||||||
}
|
}
|
||||||
|
@ -982,9 +983,10 @@ public:
|
||||||
} else {
|
} else {
|
||||||
GetTownName(this->edit_str_buf, &this->params, this->townnameparts, &this->edit_str_buf[this->edit_str_size - 1]);
|
GetTownName(this->edit_str_buf, &this->params, this->townnameparts, &this->edit_str_buf[this->edit_str_size - 1]);
|
||||||
}
|
}
|
||||||
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, MAX_LENGTH_TOWN_NAME_PIXELS);
|
UpdateTextBufferSize(&this->text);
|
||||||
|
|
||||||
this->SetFocusedWidget(TSEW_TOWNNAME_EDITBOX);
|
this->SetFocusedWidget(TSEW_TOWNNAME_EDITBOX);
|
||||||
|
this->SetWidgetDirty(TSEW_TOWNNAME_EDITBOX);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateButtons()
|
void UpdateButtons()
|
||||||
|
|
Loading…
Reference in New Issue