11-- HideHUD Mod - hidehud.lua
22-- possibly the only file needed for it all
33-- @author Richard Gráčik (mailto:r.gracik@gmail.com)
4- -- @date 13.10.2021
5-
6- print (" [HideHUD Mod] saving original draw and keyEvent functions" )
4+ -- @date 13.10.2021 - 14.10.2021
75
86HideHUDenabled = false
97
10- original = {
11- draw = draw ,
12- keyEvent = keyEvent
13- }
14-
158-- draw function that does exactly nothing
169function HideHUDdraw ()
1710end
@@ -29,14 +22,20 @@ function HideHUDkeyEvent(unicode, sym, modifier, isDown)
2922
3023end
3124
32- print (" [HideHUD Mod] overriding the keyEvent function" )
33- _G .keyEvent = HideHUDkeyEvent
34-
3525modClassEventListener = {};
3626
3727
3828function modClassEventListener :loadMap (name )
39-
29+
30+ print (" [HideHUD Mod] saving original draw and keyEvent functions" )
31+ original = {
32+ draw = draw ,
33+ keyEvent = keyEvent
34+ }
35+
36+ print (" [HideHUD Mod] overriding the keyEvent function" )
37+ _G .keyEvent = HideHUDkeyEvent
38+
4039end ;
4140
4241function modClassEventListener :deleteMap ()
@@ -48,6 +47,7 @@ function modClassEventListener:mouseEvent(posX, posY, isDown, isUp, button)
4847end ;
4948
5049function modClassEventListener :keyEvent (unicode , sym , modifier , isDown )
50+
5151 if isDown and sym == 291 then
5252 HideHUDenabled = not HideHUDenabled
5353
@@ -59,6 +59,7 @@ function modClassEventListener:keyEvent(unicode, sym, modifier, isDown)
5959 print (" [HideHUD Mod] disabling HideHUD - F10 key" )
6060 end
6161 end
62+
6263end ;
6364
6465function modClassEventListener :update (dt )
0 commit comments