ID:556065
 
(See the best response by Kaiochao.)
Another simple question that I could probably find the answer to in an interface demo... But I would rather just post it here.

So, how do you use an if statement to check if an interface grid is visible?
Best response
One way would be to use an actual variable that you set when you make grids visible or invisible.
mob
var grid_is_visible
proc
hide_grid()
if(grid_is_visible)
grid_is_visible = 0
winshow(src, "grid", 0)

show_grid()
if(grid_is_visible) return
grid_is_visible = 1
winshow(src, "grid")

toggle_grid() grid_is_visible ? hide_grid() : show_grid()



The other way, which is a much more straightforward solution to your painfully simple question, is to use winget().
var is_visible = winget(src, "grid_id", "is-visible")
if(is_visible == "true")
return TRUE
else return FALSE
Awesome! Thanks for putting up with me, Kaio. :D