Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi, not sure if I understand correctly. The way to update a widget once it's created is to either set a binding to a variable or method (if simple, i.e. the value of a UIProgressbar or the text of a UIText) or use setPreRenderCallback/setPostRenderCallback. Once you set it up, it's automatic.

When you say "when picking up things" I'm imagining you are not pausing the game while the inventory is displayed, and you want the inventory to update when picking up a new item. In this case, you can set the redraw call when picking up the object. Make a parent object with that logic and you can inherit all your items from that object, so all of them trigger the redraw.

Let me know if I understood correctly or not, thanks. By the way, nice graphics in your project!

yeah,i was asking if there is a way to avoid having to trigger a redraw, I did get it working how I want it but I'm just wondering if recalling the "show_inventory" function is going to cause performance issues in the long run. If it's not really going to cause to many issues or be non-performant that's all good

Not really. You shouldn't get any performance issues in the long run by repeatedly redrawing (destroying+recreating), the widgets are just structs and any special stuff (i.e. some surfaces) get freed up when you call destroy(), so you shouldn't have any issues with that.


You can monitor FPS and memory utilization by using the in-game Debugger or enabling the Gamemaker's debug overlay.