(svn r24324) -Codechange: Turn functions dealing with Textbufs into member functions.
This commit is contained in:
@@ -318,7 +318,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
|
||||
|
||||
/* snprintf() always outputs trailing '\0', so whole buffer can be used */
|
||||
snprintf(this->edit_str_buf, this->edit_str_size, "%u", _settings_newgame.game_creation.generation_seed);
|
||||
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size);
|
||||
this->text.Initialize(this->edit_str_buf, this->edit_str_size);
|
||||
this->caption = STR_NULL;
|
||||
this->afilter = CS_NUMERAL;
|
||||
|
||||
@@ -556,7 +556,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
|
||||
case WID_GL_RANDOM_BUTTON: // Random seed
|
||||
_settings_newgame.game_creation.generation_seed = InteractiveRandom();
|
||||
snprintf(this->edit_str_buf, this->edit_str_size, "%u", _settings_newgame.game_creation.generation_seed);
|
||||
UpdateTextBufferSize(&this->text);
|
||||
this->text.UpdateSize();
|
||||
this->SetDirty();
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user