Implementation of textfile window. More...
#include "stdafx.h"
#include "fileio_func.h"
#include "fontcache.h"
#include "gfx_type.h"
#include "gfx_func.h"
#include "string_func.h"
#include "textfile_gui.h"
#include "widgets/misc_widget.h"
#include "table/strings.h"
Go to the source code of this file.
Functions | |
const char * | GetTextfile (TextfileType type, Subdirectory dir, const char *filename) |
Search a textfile file next to the given content. | |
Variables | |
static const NWidgetPart | _nested_textfile_widgets [] |
Widgets for the textfile window. | |
static WindowDesc | _textfile_desc (WDP_CENTER,"textfile", 630, 460, WC_TEXTFILE, WC_NONE, 0, _nested_textfile_widgets, lengthof(_nested_textfile_widgets)) |
Window definition for the textfile window. |
Implementation of textfile window.
Definition in file textfile_gui.cpp.
const char* GetTextfile | ( | TextfileType | type, | |
Subdirectory | dir, | |||
const char * | filename | |||
) |
Search a textfile file next to the given content.
type | The type of the textfile to search for. | |
dir | The subdirectory to search in. | |
filename | The filename of the content to look for. |
NULL
otherwise. Definition at line 246 of file textfile_gui.cpp.
References FioCheckFileExists(), GetCurrentLanguageIsoCode(), lastof, lengthof, seprintf(), and strecpy().
Referenced by GameOptionsWindow::OnInvalidateData(), and AIConfigWindow::OnInvalidateData().
const NWidgetPart _nested_textfile_widgets[] [static] |
{ NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_MAUVE), NWidget(WWT_CAPTION, COLOUR_MAUVE, WID_TF_CAPTION), SetDataTip(STR_NULL, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_TEXTBTN, COLOUR_MAUVE, WID_TF_WRAPTEXT), SetDataTip(STR_TEXTFILE_WRAP_TEXT, STR_TEXTFILE_WRAP_TEXT_TOOLTIP), NWidget(WWT_DEFSIZEBOX, COLOUR_MAUVE), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_MAUVE, WID_TF_BACKGROUND), SetMinimalSize(200, 125), SetResize(1, 12), SetScrollbar(WID_TF_VSCROLLBAR), EndContainer(), NWidget(NWID_VERTICAL), NWidget(NWID_VSCROLLBAR, COLOUR_MAUVE, WID_TF_VSCROLLBAR), EndContainer(), EndContainer(), NWidget(NWID_HORIZONTAL), NWidget(NWID_HSCROLLBAR, COLOUR_MAUVE, WID_TF_HSCROLLBAR), NWidget(WWT_RESIZEBOX, COLOUR_MAUVE), EndContainer(), }
Widgets for the textfile window.
Definition at line 25 of file textfile_gui.cpp.