summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-02-12 10:35:15 +0000
committerrubidium <rubidium@openttd.org>2012-02-12 10:35:15 +0000
commit90af3c494a3a5839521f52988ffbe1be9a08dda1 (patch)
treebe6a1fdf08621d3631fab1201873c78004bc7c67 /src
parente8dbcf90430610e2f19aeb3b764d9e8809c8f3ea (diff)
downloadopenttd-90af3c494a3a5839521f52988ffbe1be9a08dda1.tar.xz
(svn r23933) -Codechange: make the text file window strings more generic (LordAro)
Diffstat (limited to 'src')
-rw-r--r--src/lang/english.txt20
-rw-r--r--src/newgrf_gui.cpp13
2 files changed, 18 insertions, 15 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 884e78e1c..f132639e9 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -2456,11 +2456,6 @@ STR_NEWGRF_SETTINGS_MOVEDOWN :{BLACK}Move Dow
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_DEFAULT_NAME :Parameter {NUM}
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_RESET :{BLACK}Reset
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
index 42dc03b40..1b713a24a 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -470,7 +470,7 @@ struct NewGRFTextfileWindow : public TextfileWindow {
NewGRFTextfileWindow(TextfileType file_type, const GRFConfig *c) : TextfileWindow(file_type), grf_config(c)
{
- this->GetWidget<NWidgetCore>(WID_TF_CAPTION)->SetDataTip(STR_NEWGRF_README_CAPTION + file_type, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS);
+ 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);
@@ -478,7 +478,10 @@ struct NewGRFTextfileWindow : public TextfileWindow {
/* 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());
+ }
}
};
@@ -1633,12 +1636,12 @@ static const NWidgetPart _nested_newgrf_infopanel_widgets[] = {
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),