Page 1 of 1

base:SafeSleep()

Posted: Wed Apr 15, 2015 10:53 pm
by djrikki
Here is one that deals with MUI Royale and a Window's 'Sleep' property. Avoid stacking 'sleep'.

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