(svn r23601) -Fix: fix the conflict in window number

This commit is contained in:
truebrain
2011-12-19 20:50:21 +00:00
parent bcbdc3933c
commit 561b25d031
19 changed files with 146 additions and 108 deletions

View File

@@ -443,7 +443,7 @@ struct AboutWindow : public Window {
AboutWindow() : Window()
{
this->InitNested(&_about_desc);
this->InitNested(&_about_desc, WN_GAME_OPTIONS_ABOUT);
this->counter = 5;
this->text_position = this->GetWidget<NWidgetBase>(WID_A_SCROLLING_TEXT)->pos_y + this->GetWidget<NWidgetBase>(WID_A_SCROLLING_TEXT)->current_y;
@@ -501,7 +501,7 @@ struct AboutWindow : public Window {
void ShowAboutWindow()
{
DeleteWindowById(WC_GAME_OPTIONS, 0);
DeleteWindowByClass(WC_GAME_OPTIONS);
new AboutWindow();
}
@@ -1114,7 +1114,7 @@ struct QueryStringWindow : public QueryStringBaseWindow
this->flags = flags;
InitializeTextBuffer(&this->text, this->edit_str_buf, max_bytes, max_chars);
this->InitNested(desc);
this->InitNested(desc, WN_QUERY_STRING);
this->parent = parent;
@@ -1245,7 +1245,7 @@ static const WindowDesc _query_string_desc(
*/
void ShowQueryString(StringID str, StringID caption, uint maxsize, Window *parent, CharSetFilter afilter, QueryStringFlags flags)
{
DeleteWindowById(WC_QUERY_STRING, 0);
DeleteWindowByClass(WC_QUERY_STRING);
new QueryStringWindow(str, caption, ((flags & QSF_LEN_IN_CHARS) ? MAX_CHAR_LENGTH : 1) * maxsize, maxsize, &_query_string_desc, parent, afilter, flags);
}
@@ -1267,7 +1267,7 @@ struct QueryWindow : public Window {
this->message = message;
this->proc = callback;
this->InitNested(desc);
this->InitNested(desc, WN_CONFIRM_POPUP_QUERY);
this->parent = parent;
this->left = parent->left + (parent->width / 2) - (this->width / 2);