OpenTTD Source: src/textfile_gui.h File Reference

OpenTTD Source 12.0-beta1

Data Structures | Functions
textfile_gui.h File Reference
`#include "fileio_type.h"`
`#include "strings_func.h"`
`#include "textfile_type.h"`
`#include "window_gui.h"`

Go to the source code of this file.

## Data Structures
struct | TextfileWindow
| Window for displaying a textfile. More...
struct | TextfileWindow::Line

## Functions
const char * | GetTextfile (TextfileType type, Subdirectory dir, const char *filename)
| Search a textfile file next to the given content. More...

## Detailed Description

GUI functions related to textfiles.

Definition in file textfile_gui.h.

## Function Documentation

## ◆ GetTextfile()

const char* GetTextfile | ( | TextfileType | type,
|  | Subdirectory | dir,
|  | const char * | filename
| ) |  |

Search a textfile file next to the given content.

Parameters

  type | The type of the textfile to search for.
  dir | The subdirectory to search in.
  filename | The filename of the content to look for.

Returns
  The path to the textfile, `nullptr` otherwise.

Definition at line 416 of file textfile_gui.cpp.

References lengthof.

Referenced by ScriptConfig::GetTextfile(), and GRFConfig::GetTextfile().