OpenTTD Development Documentation
External Links

OpenTTD GitHub
Contributing to OpenTTD - guidelines
OpenTTD Doxygen

General Reference

Coding style
Compiling OpenTTD
Add a setting
Add a squirrel function
Understanding the SaveGame handler
Bumping the savegame version
Doing an OpenTTD release

Language and Strings

Manual of style
Format of langfiles
Using OpenTTD strings
List of special strings

Window System

Using the window system
Colour codes that exist in OpenTTD
Adding a text box
Understanding the widget focus system
GUI style guide


The OpenTTD TCP protocol
The OpenTTD UDP protocol
Debugging desyncs
Server Admin Port development

Ingame Console

The console window
Console commands
Console variables
Using console scripting
Adding functions/commands to the console
Adding variables to the console
Console development history

Content APIs (modding frameworks)

Graphics and similar (NewGRF)
AI framework (NoAI)
GameScript framework (NoGO)

Other Reference

Map array (landscape grid)
Train acceleration
Sound IDs

The way users interact with edit boxes is influenced by the widget focus system. This page describes what modifications that are necessary to add a text box to a window that do not have it yet.

Checklist for adding a text box to a window


(should be on one line, but has been broken up on two lines here on the wiki to avoid horizontal scrolling)

QueryString filter_editbox; ///< Filter editbox;
/* Initialize the text edit widget */
this->querystrings[WID_SIL_FILTER_TEXT] = &this->filter_editbox;
this->filter_editbox.ok_button = WID_SIL_FILTER_ENTER_BTN;
this->filter_editbox.cancel_button = QueryString::ACTION_CLEAR;
virtual void OnEditboxChanged(int widget)

Related articles

Understanding the widget focus system