Skip to content

Commit

Permalink
remove and re-create hud elements
Browse files Browse the repository at this point in the history
as they are toggled. Hoping to have a healing effect on hud-engine
this way.

also improved the visual of mesecon_debug info
  • Loading branch information
SwissalpS committed Nov 4, 2019
1 parent 469fa95 commit 2cffb4f
Show file tree
Hide file tree
Showing 3 changed files with 212 additions and 78 deletions.
5 changes: 5 additions & 0 deletions forms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ postool.register_on_player_receive_fields = function(oPlayer, sFormName, tFields
-- we get a table with just one element in it.
if nil ~= tFields.bMain then
tDB.bMain = 'true' == tFields.bMain
if not tDB.bMain then
postool.savePlayerToggles(oPlayer)
postool.removeHudElements(oPlayer)
return
end -- if turned off
end

if nil ~= tFields.bTrain then
Expand Down
Loading

0 comments on commit 2cffb4f

Please sign in to comment.