Jump to content

How to use widgets?


Recommended Posts

Hello.
I'm trying to understand how widgets work, someone could give a didactic explanation. An explanation of when to use AddClassPostConstruct (); Class (Widget, function (self, ...)).
For example, if I want to remove that inventory bar, image below, and add another image, what should I do?

image.thumb.png.b300e44c77a954d65043496b51f69e29.png

Thanks in advance.

Link to comment
Share on other sites

For the example above, I solved it with the code below. But I still want an explanation of how the widgets work, if anyone can do this favor, I appreciate it.

AddClassPostConstruct("widgets/inventorybar", function(self, owner)   
	self.bgcover:Kill() 
	self.bg:Kill()
	repeat
		table.remove(self.equipslotinfo)
	until #self.equipslotinfo==0
	function Inv:SelectDefaultSlot()
	end
end)

 

Link to comment
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
 Share

×
  • Create New...