Jump to content

Recommended Posts

@vteam7 @Mobbstar
How bout this?

inv_slot.bgimage:SetTint()

Used in this mod.


For reference:
local function TintingPostInit(self, num, atlas, bgim, owner, container)	if container.widgetbgimagetint then		self.bgimage:SetTint(container.widgetbgimagetint.r, container.widgetbgimagetint.g, container.widgetbgimagetint.b, container.widgetbgimagetint.a)	endendAddClassPostConstruct("widgets/invslot", TintingPostInit) 
inst.components.container.widgetbgimagetint = {r=.44,g=.74,b=1,a=1} 

 

Two differences in this approach:

  • Uses internal tint function instead of swapping the image completely
  • Overrides the invslot widget beforehand instead of indexing through tables to find the already-created widget.
Edited by Blueberrys

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
×
  • Create New...