. . .

can someone help me fix this code? (fixed)

Recommended Posts

. . .    4170

hello, i use a mod which all of its code is basically this in modmain.lua

local function HideMapControls(self)
		self.rotleft:Kill()
		self.rotright:Kill()
		self.pauseBtn:Kill()
		self.minimapBtn:Kill()
	end
	AddClassPostConstruct("widgets/mapcontrols", HideMapControls)

what it does is get rid of these icons on the bottom right of the screen

aa.gif.759ddeeb16aa505da7764ff554243224.gif

because I have bad OCD I like my screen to have as little UI/HUD especially when I feel it's kinda pointless since all these icons you can preform their actions by pressing keys so I prefer have them gone.

 

In the latest beta DST update this code now causes when a player dies or revives the game instantly stops responding and you have to close it, i have no idea how to fix it so if anyone smart knows a way that it can be fixed or same thing can be achieved by making these icons invisible I'd be very grateful, thank you for your time. have a great day :D!

Edited by . . .

Share this post


Link to post
Share on other sites
-t-    223

Try this
 

AddClassPostConstruct("widgets/mapcontrols", function(self)
	function self:Show()
		self._base.Hide(self)
		self:RefreshTooltips()
	end
end)

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now