(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:
rubidium 2009-09-27 10:44:25 +00:00
parent 8a21979b42
commit 09124e2186
1 changed files with 3 additions and 1 deletions

View File

@ -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()