ID:1837590
 
(See the best response by FishMan123.)
Code:


Problem description:

Hey. I'm in the process of making a game, but instead of having chat, inventory, equipment (etc) windows and panes anchored permanently I'd like to use interface buttons (or verbs) to make those windows or panes pop up.

Could anyone give me some sample code to make that happen? It can be similar to the way that Eternia game uses HUD/interface buttons, if that makes my explanation easier.
mob
var/Showing = 0

verb/ShowWindow()
Showing =! Showing
winshow(usr, "WindowName", Showing)
Oh it's that simple? Thanks lol.
Best response
You can make it a lot simpler and more dynamic if u make use of datums and associative lists.
Oh okay, I'll definitely look into that. Thanks a lot.