diff options
author | Seth Traverse <technotraverse@gmail.com> | 2021-04-20 10:23:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-20 19:23:31 +0200 |
commit | 16e5b39e1dbe503684effb11f4b87a641c3e43e6 (patch) | |
tree | 50d8ba701784ecb2d9d235bd97e20200cef1fb40 /src/client/hud.h | |
parent | 0077982fb78a8ed39a90da03c0898d12583fed64 (diff) | |
download | minetest-16e5b39e1dbe503684effb11f4b87a641c3e43e6.tar.gz minetest-16e5b39e1dbe503684effb11f4b87a641c3e43e6.tar.bz2 minetest-16e5b39e1dbe503684effb11f4b87a641c3e43e6.zip |
Add a key to toggle map block bounds (#11172)
It's often useful to know where the map block boundaries are for doing server admin work and the like.
Adds three modes: single mapblock, range of 5, and disabled.
Diffstat (limited to 'src/client/hud.h')
-rw-r--r-- | src/client/hud.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/hud.h b/src/client/hud.h index d46545d71..7046a16fb 100644 --- a/src/client/hud.h +++ b/src/client/hud.h @@ -59,6 +59,9 @@ public: Inventory *inventory); ~Hud(); + void toggleBlockBounds(); + void drawBlockBounds(); + void drawHotbar(u16 playeritem); void resizeHotbar(); void drawCrosshair(); @@ -125,6 +128,14 @@ private: scene::SMeshBuffer m_rotation_mesh_buffer; + enum BlockBoundsMode + { + BLOCK_BOUNDS_OFF, + BLOCK_BOUNDS_CURRENT, + BLOCK_BOUNDS_ALL, + BLOCK_BOUNDS_MAX + } m_block_bounds_mode = BLOCK_BOUNDS_OFF; + enum { HIGHLIGHT_BOX, |