Jump to content

Recommended Posts

I'd like to get some tips about how I should be drawing UI elements next to Containers. Specifically, when a Chest is opened by a player, I want to draw a clickable button below the Chest. 

Any tips on any part of this greatly appreciated. I've not tried drawing anything to screen before, so this is pretty new to me. Happy to go read code from other mods if they've done anything similar (I had a look on the Workshop but couldn't find anything similar).

Edited by DJPaul

Take a look: https://steamcommunity.com/sharedfiles/filedetails/?id=365119238
Look into containers_setup.lua and containerwidgetfunction.lua and search for buttoninfo2.
If you want the button below the Chest just use SetPosition.

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...