vteam7 Posted July 6, 2015 Share Posted July 6, 2015 Hi, I would like to ask what affects the inventory slot color? Like for example the inventory slot color for the icebox and insulated pack are blue. Is it possible to add other colors? Thanks Link to comment https://forums.kleientertainment.com/forums/topic/55916-inventory-slot-color/ Share on other sites More sharing options...
Mobbstar Posted July 6, 2015 Share Posted July 6, 2015 (edited) I use an highly mad-hacked way in IR (upgrade slots) and Alchemical Brewage (distiller). I even explained it here. Maybe there's special code for it though, let me take a look. EDIT: Can't find anything... Edited July 6, 2015 by Mobbstar Link to comment https://forums.kleientertainment.com/forums/topic/55916-inventory-slot-color/#findComment-652209 Share on other sites More sharing options...
Blueberrys Posted July 6, 2015 Share Posted July 6, 2015 (edited) @vteam7 @MobbstarHow 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 completelyOverrides the invslot widget beforehand instead of indexing through tables to find the already-created widget. Edited July 6, 2015 by Blueberrys Link to comment https://forums.kleientertainment.com/forums/topic/55916-inventory-slot-color/#findComment-652217 Share on other sites More sharing options...
vteam7 Posted July 7, 2015 Author Share Posted July 7, 2015 Thanks guys! I'll try them out and see how it goes. ^^ Link to comment https://forums.kleientertainment.com/forums/topic/55916-inventory-slot-color/#findComment-652318 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now