Code: Select all
Global base
base = {}
; Because Sleep is a strangely stackable class property of a window most of the time you will want to prevent this from happening, this function stops this from ever happening.
Function base:SafeSleep(window,state)
If mui.Get(window,"sleep") = Not(state)
mui.Set(window,"sleep",state)
EndIf
EndFunction