MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsContainerWidgetType

Function IsContainerWidgetType

src/widget.cpp:3353–3357  ·  view source on GitHub ↗

* Test if WidgetType is a container widget. * @param tp WidgetType to test. * @return True iff WidgetType is a container widget. */

Source from the content-addressed store, hash-verified

3351 * @return True iff WidgetType is a container widget.
3352 */
3353bool IsContainerWidgetType(WidgetType tp)
3354{
3355 return tp == NWID_HORIZONTAL || tp == NWID_HORIZONTAL_LTR || tp == NWID_VERTICAL || tp == NWID_MATRIX
3356 || tp == WWT_PANEL || tp == WWT_FRAME || tp == WWT_INSET || tp == NWID_SELECTION || tp == NWID_LAYER;
3357}
3358
3359/**
3360 * Build a nested widget tree by recursively filling containers with nested widgets read from their parts.

Callers 3

MakeNWidgetFunction · 0.85
MakeWidgetTreeFunction · 0.85
IsNWidgetTreeClosedFunction · 0.85

Calls

no outgoing calls

Tested by 1

IsNWidgetTreeClosedFunction · 0.68