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

Function ToggleDirtyBlocks

src/toolbar_gui.cpp:1105–1113  ·  view source on GitHub ↗

* Toggle drawing of the dirty blocks. * @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

1103 * importing the settings structs to there.
1104 */
1105void ToggleDirtyBlocks()
1106{
1107 extern bool _draw_dirty_blocks;
1108 /* Always allow to toggle them off */
1109 if (_settings_client.gui.newgrf_developer_tools || _draw_dirty_blocks) {
1110 _draw_dirty_blocks = !_draw_dirty_blocks;
1111 MarkWholeScreenDirty();
1112 }
1113}
1114
1115/**
1116 * Toggle drawing of widget outlines.

Callers 2

MenuClickHelpFunction · 0.85
OnHotkeyMethod · 0.85

Calls 1

MarkWholeScreenDirtyFunction · 0.85

Tested by

no test coverage detected