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

Function ToggleBoundingBoxes

src/toolbar_gui.cpp:1088–1096  ·  view source on GitHub ↗

* Toggle drawing of sprites' bounding boxes. * @note has only an effect when newgrf_developer_tools are active. * * Function is found here and not in viewport.cpp in order to avoid * importing the settings structs to there. */

Source from the content-addressed store, hash-verified

1086 * importing the settings structs to there.
1087 */
1088void ToggleBoundingBoxes()
1089{
1090 extern bool _draw_bounding_boxes;
1091 /* Always allow to toggle them off */
1092 if (_settings_client.gui.newgrf_developer_tools || _draw_bounding_boxes) {
1093 _draw_bounding_boxes = !_draw_bounding_boxes;
1094 MarkWholeScreenDirty();
1095 }
1096}
1097
1098/**
1099 * Toggle drawing of the dirty blocks.

Callers 2

MenuClickHelpFunction · 0.85
OnHotkeyMethod · 0.85

Calls 1

MarkWholeScreenDirtyFunction · 0.85

Tested by

no test coverage detected