Mercurial > hg > openttd
changeset 19560:b64f37b0e118 draft
(svn r24467) -Codechange [FS#5236]: make textfile window class slightly more general (LordAro)
author | yexo <yexo@openttd.org> |
---|---|
date | Mon, 13 Aug 2012 18:52:47 +0000 |
parents | 31a0fd7bc408 |
children | aad95c6709bb |
files | src/ai/ai_gui.cpp src/newgrf_gui.cpp src/settings_gui.cpp src/textfile_gui.cpp |
diffstat | 4 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -646,8 +646,6 @@ ScriptTextfileWindow(TextfileType file_type, CompanyID slot) : TextfileWindow(file_type), slot(slot) { - this->GetWidget<NWidgetCore>(WID_TF_CAPTION)->SetDataTip(STR_TEXTFILE_README_CAPTION + file_type, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS); - const char *textfile = GetConfig(slot)->GetTextfile(file_type, slot); this->LoadTextfile(textfile, (slot == OWNER_DEITY) ? GAME_DIR : AI_DIR); }
--- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -542,8 +542,6 @@ NewGRFTextfileWindow(TextfileType file_type, const GRFConfig *c) : TextfileWindow(file_type), grf_config(c) { - this->GetWidget<NWidgetCore>(WID_TF_CAPTION)->SetDataTip(STR_TEXTFILE_README_CAPTION + file_type, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS); - const char *textfile = this->grf_config->GetTextfile(file_type); this->LoadTextfile(textfile, NEWGRF_DIR); }
--- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -127,8 +127,6 @@ BaseSetTextfileWindow(TextfileType file_type, const TBaseSet* baseset, StringID content_type) : TextfileWindow(file_type), baseset(baseset), content_type(content_type) { - this->GetWidget<NWidgetCore>(WID_TF_CAPTION)->SetDataTip(STR_TEXTFILE_README_CAPTION + file_type, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS); - const char *textfile = this->baseset->GetTextfile(file_type); this->LoadTextfile(textfile, BASESET_DIR); }
--- a/src/textfile_gui.cpp +++ b/src/textfile_gui.cpp @@ -55,6 +55,7 @@ this->vscroll = this->GetScrollbar(WID_TF_VSCROLLBAR); this->hscroll = this->GetScrollbar(WID_TF_HSCROLLBAR); this->FinishInitNested(&_textfile_desc); + this->GetWidget<NWidgetCore>(WID_TF_CAPTION)->SetDataTip(STR_TEXTFILE_README_CAPTION + file_type, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS); } /* virtual */ TextfileWindow::~TextfileWindow()