--[[( var_setclr == 1 ) and "On" or ( var_setclr == 2 ) and "Off" 

Opacity
var_ms_which_opacity

Face Script Area
]]

var_ms_which_opacity = 0
var_setclr = 2
var_transition = ( 'linear' )

function on_display_bright()
var_ms_which_opacity = 100
end

function setclr()
var_setclr = ( var_setclr % 2 ) + 1
wm_transition( var_transition )

var_ms_which_opacity = 100
function on_millisecond( dt )
if var_ms_which_opacity > 0 then
var_ms_which_opacity = var_ms_which_opacity - 2.5
end
end
end

var_mode = 1
function mode(e)
   if var_mode < 2 then
      var_mode = var_mode + 1
else
var_mode = 1
end
end 

var_scaleFactor = 1.26
var_zoomSpeed = 0.3
tweens.scale  =1
var_zoom = false

var_bez=0

function setbez()
     if var_bez==1 then
        var_bez=0
     else
        var_bez=var_bez+1
     end
end

tweens.rotate=360

function rotate_tick()
  wm_schedule {
    action='tween',
    tween='rotate',
    to=tweens.rotate-6,
    duration=0.3,
    easing=outQuad }
    tweens.rotate=tweens.rotate-6
end

function rotate_min()
if tweens.rotate<={drm} and tweens.rotate>0 then
 wm_schedule {
    action='tween',
    tween='rotate',
    to=0,
    duration=1.5,
    easing=outQuad }
    tweens.rotate=360
else
if tweens.rotate>{drm} then
 wm_schedule {
    action='tween',
    tween='rotate',
    to={drm},
    duration=1.5,
    easing=outQuad }
    tweens.rotate={drm} 
else 
if tweens.rotate==0 then
   tweens.rotate=360
 wm_schedule {
    action='tween',
    tween='rotate',
    to={drm},
    duration=1.5,
    easing=outQuad }
    tweens.rotate={drm}
end
end
end
end
function tweenme(f, t)
	wm_schedule{action = 'tween', tween = 'scale', from = f, to = t, duration = var_zoomSpeed, easing = inOutCubic} 
end

var_switch=0

function toggle_switch()
     if var_switch== 4 then
        var_switch=0
     else
        var_switch=var_switch+1
     end
    wm_transition('FlipFromRight')
end