# HG changeset patch # Parent 1deaacd0498dfb00f1b9965f0b53ea0e1ff17673 diff --git a/src/lang/english.txt b/src/lang/english.txt --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -2456,11 +2456,6 @@ STR_NEWGRF_SETTINGS_MOVEDOWN_TOOLTIP :{BLACK}Move the selected NewGRF file down the list STR_NEWGRF_SETTINGS_FILE_TOOLTIP :{BLACK}A list of the NewGRF files that are installed. -# Additional textfiles accompanying NewGRFs -STR_NEWGRF_SETTINGS_VIEW_README :{BLACK}View readme -STR_NEWGRF_SETTINGS_VIEW_CHANGELOG :{BLACK}Changelog -STR_NEWGRF_SETTINGS_VIEW_LICENSE :{BLACK}Licence - STR_NEWGRF_SETTINGS_SET_PARAMETERS :{BLACK}Set parameters STR_NEWGRF_SETTINGS_SHOW_PARAMETERS :{BLACK}Show parameters STR_NEWGRF_SETTINGS_TOGGLE_PALETTE :{BLACK}Toggle palette @@ -2492,11 +2487,6 @@ STR_NEWGRF_PARAMETERS_SETTING :{STRING1}: {ORANGE}{STRING1} STR_NEWGRF_PARAMETERS_NUM_PARAM :{LTBLUE}Number of parameters: {ORANGE}{NUM} -# NewGRF textfile window -STR_NEWGRF_README_CAPTION :{WHITE}NewGRF readme of {RAW_STRING} -STR_NEWGRF_CHANGELOG_CAPTION :{WHITE}NewGRF changelog of {RAW_STRING} -STR_NEWGRF_LICENSE_CAPTION :{WHITE}NewGRF licence of {RAW_STRING} - # NewGRF inspect window STR_NEWGRF_INSPECT_CAPTION :{WHITE}Inspect - {STRING5} STR_NEWGRF_INSPECT_PARENT_BUTTON :{BLACK}Parent @@ -3571,6 +3561,16 @@ STR_AI_SETTINGS_SETTING :{RAW_STRING}: {ORANGE}{STRING1} STR_AI_SETTINGS_START_DELAY :Number of days to start this AI after the previous one (give or take): {ORANGE}{STRING1} + +# Textfile window +STR_TEXTFILE_README_CAPTION :{WHITE}{STRING} readme of {RAW_STRING} +STR_TEXTFILE_CHANGELOG_CAPTION :{WHITE}{STRING} changelog of {RAW_STRING} +STR_TEXTFILE_LICENCE_CAPTION :{WHITE}{STRING} licence of {RAW_STRING} +STR_TEXTFILE_VIEW_README :{BLACK}View readme +STR_TEXTFILE_VIEW_CHANGELOG :{BLACK}Changelog +STR_TEXTFILE_VIEW_LICENCE :{BLACK}Licence + + # Vehicle loading indicators STR_PERCENT_UP_SMALL :{TINY_FONT}{WHITE}{NUM}%{UP_ARROW} STR_PERCENT_UP :{WHITE}{NUM}%{UP_ARROW} diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -469,7 +469,7 @@ NewGRFTextfileWindow(const WindowDesc *desc, TextfileType file_type, const GRFConfig *c) : TextfileWindow(desc, file_type), grf_config(c) { - this->GetWidget(WID_TF_CAPTION)->SetDataTip(STR_NEWGRF_README_CAPTION + file_type, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS); + this->GetWidget(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); @@ -477,7 +477,10 @@ /* virtual */ void SetStringParameters(int widget) const { - if (widget == WID_TF_CAPTION) SetDParamStr(0, this->grf_config->GetName()); + if (widget == WID_TF_CAPTION) { + SetDParam(0, STR_CONTENT_TYPE_NEWGRF); + SetDParamStr(1, this->grf_config->GetName()); + } } }; @@ -1632,12 +1635,12 @@ NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_OPEN_URL), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_CONTENT_OPEN_URL, STR_CONTENT_OPEN_URL_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_NEWGRF_TEXTFILE + TFT_README), SetFill(1, 0), SetResize(1, 0), - SetDataTip(STR_NEWGRF_SETTINGS_VIEW_README, STR_NULL), + SetDataTip(STR_TEXTFILE_VIEW_README, STR_NULL), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_NEWGRF_TEXTFILE + TFT_CHANGELOG), SetFill(1, 0), SetResize(1, 0), - SetDataTip(STR_NEWGRF_SETTINGS_VIEW_CHANGELOG, STR_NULL), + SetDataTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_NULL), NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_NEWGRF_TEXTFILE + TFT_LICENSE), SetFill(1, 0), SetResize(1, 0), - SetDataTip(STR_NEWGRF_SETTINGS_VIEW_LICENSE, STR_NULL), + SetDataTip(STR_TEXTFILE_VIEW_LICENCE, STR_NULL), EndContainer(), EndContainer(), NWidget(NWID_SELECTION, INVALID_COLOUR, WID_NS_SHOW_APPLY),