OpenTTD Source  1.11.2
object_gui.cpp File Reference
#include "stdafx.h"
#include "command_func.h"
#include "hotkeys.h"
#include "newgrf.h"
#include "newgrf_object.h"
#include "newgrf_text.h"
#include "object.h"
#include "querystring_gui.h"
#include "sortlist_type.h"
#include "stringfilter_type.h"
#include "string_func.h"
#include "strings_func.h"
#include "viewport_func.h"
#include "tilehighlight_func.h"
#include "window_gui.h"
#include "window_func.h"
#include "zoom_func.h"
#include "widgets/object_widget.h"
#include "table/strings.h"
#include "safeguards.h"

Go to the source code of this file.

Data Structures

class  BuildObjectWindow
 The window used for building objects. More...
 

Enumerations

enum  BuildObjectHotkeys { BOHK_FOCUS_FILTER_BOX }
 Enum referring to the Hotkeys in the build object window. More...
 

Functions

static EventState BuildObjectGlobalHotkeys (int hotkey)
 Handler for global hotkeys of the BuildObjectWindow. More...
 
WindowShowBuildObjectPicker ()
 Show our object picker. More...
 
void InitializeObjectGui ()
 Reset all data of the object GUI.
 

Variables

static ObjectClassID _selected_object_class
 Currently selected available object class.
 
static int _selected_object_index
 Index of the currently selected object if existing, else -1.
 
static uint8 _selected_object_view
 the view of the selected object
 
static Hotkey buildobject_hotkeys []
 
static const NWidgetPart _nested_build_object_widgets []
 
static WindowDesc _build_object_desc (WDP_AUTO, "build_object", 0, 0, WC_BUILD_OBJECT, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_build_object_widgets, lengthof(_nested_build_object_widgets), &BuildObjectWindow::hotkeys)
 

Detailed Description

The GUI for objects.

Definition in file object_gui.cpp.

Enumeration Type Documentation

◆ BuildObjectHotkeys

Enum referring to the Hotkeys in the build object window.

Enumerator
BOHK_FOCUS_FILTER_BOX 

Focus the edit box for editing the filter string.

Definition at line 39 of file object_gui.cpp.

Function Documentation

◆ BuildObjectGlobalHotkeys()

static EventState BuildObjectGlobalHotkeys ( int  hotkey)
static

Handler for global hotkeys of the BuildObjectWindow.

Parameters
hotkeyHotkey
Returns
ES_HANDLED if hotkey was accepted.

Definition at line 631 of file object_gui.cpp.

◆ ShowBuildObjectPicker()

Window* ShowBuildObjectPicker ( )

Show our object picker.


Definition at line 712 of file object_gui.cpp.

Variable Documentation

◆ buildobject_hotkeys

Hotkey buildobject_hotkeys[]
static
Initial value:
= {
Hotkey('F', "focus_filter_box", BOHK_FOCUS_FILTER_BOX),
HOTKEY_LIST_END
}

Definition at line 639 of file object_gui.cpp.

BOHK_FOCUS_FILTER_BOX
@ BOHK_FOCUS_FILTER_BOX
Focus the edit box for editing the filter string.
Definition: object_gui.cpp:40
Hotkey
All data for a single hotkey.
Definition: hotkeys.h:22