Changeset - r23228:254805b85f46
[Not reviewed]
master
0 5 0
glx - 5 years ago 2019-01-28 22:51:34
glx@openttd.org
Add: allow opening of one TextfileWindow per type
5 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/ai/ai_gui.cpp
Show inline comments
 
@@ -660,7 +660,7 @@ struct ScriptTextfileWindow : public Tex
 
 */
 
void ShowScriptTextfileWindow(TextfileType file_type, CompanyID slot)
 
{
 
	DeleteWindowByClass(WC_TEXTFILE);
 
	DeleteWindowById(WC_TEXTFILE, file_type);
 
	new ScriptTextfileWindow(file_type, slot);
 
}
 

	
src/network/network_content_gui.cpp
Show inline comments
 
@@ -76,7 +76,7 @@ struct ContentTextfileWindow : public Te
 

	
 
void ShowContentTextfileWindow(TextfileType file_type, const ContentInfo *ci)
 
{
 
	DeleteWindowByClass(WC_TEXTFILE);
 
	DeleteWindowById(WC_TEXTFILE, file_type);
 
	new ContentTextfileWindow(file_type, ci);
 
}
 

	
src/newgrf_gui.cpp
Show inline comments
 
@@ -561,7 +561,7 @@ struct NewGRFTextfileWindow : public Tex
 

	
 
void ShowNewGRFTextfileWindow(TextfileType file_type, const GRFConfig *c)
 
{
 
	DeleteWindowByClass(WC_TEXTFILE);
 
	DeleteWindowById(WC_TEXTFILE, file_type);
 
	new NewGRFTextfileWindow(file_type, c);
 
}
 

	
src/settings_gui.cpp
Show inline comments
 
@@ -162,7 +162,7 @@ struct BaseSetTextfileWindow : public Te
 
template <class TBaseSet>
 
void ShowBaseSetTextfileWindow(TextfileType file_type, const TBaseSet* baseset, StringID content_type)
 
{
 
	DeleteWindowByClass(WC_TEXTFILE);
 
	DeleteWindowById(WC_TEXTFILE, file_type);
 
	new BaseSetTextfileWindow<TBaseSet>(file_type, baseset, content_type);
 
}
 

	
src/textfile_gui.cpp
Show inline comments
 
@@ -65,7 +65,7 @@ TextfileWindow::TextfileWindow(TextfileT
 
	this->CreateNestedTree();
 
	this->vscroll = this->GetScrollbar(WID_TF_VSCROLLBAR);
 
	this->hscroll = this->GetScrollbar(WID_TF_HSCROLLBAR);
 
	this->FinishInitNested();
 
	this->FinishInitNested(file_type);
 
	this->GetWidget<NWidgetCore>(WID_TF_CAPTION)->SetDataTip(STR_TEXTFILE_README_CAPTION + file_type, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS);
 

	
 
	this->hscroll->SetStepSize(10); // Speed up horizontal scrollbar
0 comments (0 inline, 0 general)