(version 2)
(include "sci.sh")
(exports
    0 controlPanel
)
(use "Main")
(use "GloryWindow")
(use "Slider")
(use "IconI")
(use "GameControls")
(use "User")
(script 25)



(instance public controlPanel of GameControls
    (properties)

    (method (init)
        = window gcWin
        (self:add(detailSlider (volumeSlider:
                theObj(gGame)
                selector(400)
                yourself()
            )
 (speedSlider:
                theObj(gGame)
                selector(336)
                yourself()
            )
 arcadeSlider (iconSave:
                theObj(gGame)
                selector(75)
                yourself()
            )
 (iconRestore:
                theObj(gGame)
                selector(76)
                yourself()
            )
 (iconRestart:
                theObj(gGame)
                selector(101)
                yourself()
            )
 (iconQuit:
                theObj(gGame)
                selector(100)
                yourself()
            )
 (iconAbout:
                theObj(gGame)
                selector(624)
                yourself()
            )
 iconHelp iconOk))
        (self:eachElementDo(212 -1))
        (self:eachElementDo(213 -1))
        = helpIconItem iconHelp
        = curIcon iconRestore
        = state 2048
    )

)
(instance gcWin of GloryWindow
    (properties)

    (method (open)
        (var temp0[2], temp2, temp3, temp4, temp5, temp6, temp7, temp8[4], thePriority, temp13, temp14[25], temp39[4])
        = thePriority -1
        = top (/ (- 200 (+ CelHigh(933 1 1) 6)) 2)
        = left (/ (- 320 (+ 184 CelWide(933 0 1))) 2)
        = bottom (+ (+ CelHigh(933 1 1) 6) (/ (- 200 (+ CelHigh(933 1 1) 6)) 2))
        = right (+ (+ 184 CelWide(933 0 1)) (/ (- 320 (+ 184 CelWide(933 0 1))) 2))
        = priority thePriority
        (super:open())
        DrawCel(933 1 1 4 3 thePriority)
        DrawCel(933 1 0 95 28 thePriority)
        DrawCel(933 1 0 131 28 thePriority)
        DrawCel(933 1 0 167 28 thePriority)
        DrawCel(933 0 2 136 - 24 (+ CelHigh(933 0 4) 3) thePriority)
        DrawCel(933 0 3 100 - 24 (+ CelHigh(933 0 4) 3) thePriority)
        DrawCel(933 0 4 64 - 24 (+ CelHigh(933 0 4) 3) thePriority)
        DrawCel(933 0 5 173 - 24 (+ CelHigh(933 0 4) 3) thePriority)
        = temp2 (+ 31 CelHigh(933 0 1))
        = temp5 (+ temp2 20)
        = temp3 (+ 4 CelWide(933 1 1))
        = temp4 (+ temp3 (- (+ 184 CelWide(933 0 1)) (+ (+ 4 CelWide(933 1 1)) 10)))
        = temp6 22
        = temp7 1
        Message(0 25 16 0 1 1 @temp14)
        TextSize(@temp39 @temp14 999 0)
        Display(@temp14 105 123 102 30 100 - (+ CelWide(933 0 5) (+ 4 CelWide(933 1 1))) 30 - (+ (+ 31 CelHigh(933 0 1)) 7) 2)
        Display(@temp14 105 123 102 25 100 - (+ CelWide(933 0 5) (+ 4 CelWide(933 1 1))) 31 - (+ (+ 31 CelHigh(933 0 1)) 7) 3)
    )

)
(instance detailSlider of Slider
    (properties
        view 933
        loop 0
        cel 1
        nsLeft 67
        nsTop 24
        signal $0080
        noun 15
        modNum 25
        helpVerb 9
        sliderView 933
        yStep 2
        bottomValue 1
        topValue 5
    )

    (method (doit param1)
        (if (paramTotal)
            (send gGame:detailLevel(param1))
        )
        (send gGame:detailLevel())
    )

)
(instance volumeSlider of Slider
    (properties
        view 933
        loop 0
        cel 1
        nsLeft 103
        nsTop 24
        signal $0080
        noun 24
        modNum 25
        helpVerb 9
        sliderView 933
        yStep 2
        topValue 15
    )
)
(instance speedSlider of Slider
    (properties
        view 933
        loop 0
        cel 1
        nsLeft 139
        nsTop 24
        signal $0080
        noun 23
        modNum 25
        helpVerb 9
        sliderView 933
        yStep 2
        bottomValue 15
    )

    (method (show param1)
        (if (not (User:controls) or proc0_6(119))
            = signal 132
            = sliderLoop 9
        )(else
            = sliderLoop 0
            = signal 128
        )
        (super:show(rest param1))
    )


    (method (mask)
    )


    (method (move param1)
        (if ((User:controls) and not proc0_6(119))
            (super:move(rest param1))
        )
    )

)
(instance arcadeSlider of Slider
    (properties
        view 933
        loop 0
        cel 1
        nsLeft 174
        nsTop 24
        signal $0080
        noun 4
        modNum 25
        helpVerb 9
        sliderView 933
        yStep 2
        bottomValue 1
        topValue 15
    )

    (method (doit param1)
        (if (paramTotal)
            = global209 (/ (+ param1 4) 5)
        )
        return * (- global209 1) 8
    )

)
(instance iconSave of ControlIcon
    (properties
        view 933
        loop 2
        cel 0
        nsLeft 8
        nsTop 6
        message 10
        signal $01c3
        noun 22
        modNum 25
        helpVerb 9
    )

    (method (highlight param1)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
        )(else
            DrawCel(view loop cel nsLeft nsTop -1)
        )
    )

)
(instance iconRestore of ControlIcon
    (properties
        view 933
        loop 3
        cel 0
        nsLeft 8
        nsTop 23
        message 10
        signal $01c3
        noun 21
        modNum 25
        helpVerb 9
    )

    (method (highlight param1)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
        )(else
            DrawCel(view loop cel nsLeft nsTop -1)
        )
    )

)
(instance iconRestart of ControlIcon
    (properties
        view 933
        loop 4
        cel 0
        nsLeft 8
        nsTop 40
        message 10
        signal $01c3
        noun 20
        modNum 25
        helpVerb 9
    )

    (method (highlight param1)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
        )(else
            DrawCel(view loop cel nsLeft nsTop -1)
        )
    )

)
(instance iconQuit of ControlIcon
    (properties
        view 933
        loop 5
        cel 0
        nsLeft 8
        nsTop 57
        message 10
        signal $01c3
        noun 19
        modNum 25
        helpVerb 9
    )

    (method (highlight param1)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
        )(else
            DrawCel(view loop cel nsLeft nsTop -1)
        )
    )

)
(instance iconAbout of ControlIcon
    (properties
        view 933
        loop 6
        cel 0
        nsLeft 8
        nsTop 74
        message 10
        signal $01c3
        noun 16
        modNum 25
        helpVerb 9
    )

    (method (highlight param1)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
        )(else
            DrawCel(view loop cel nsLeft nsTop -1)
        )
    )

)
(instance iconHelp of IconI
    (properties
        view 933
        loop 7
        cel 0
        nsLeft 8
        nsTop 91
        cursor 949
        message 9
        signal $0183
        noun 17
        modNum 25
        helpVerb 9
    )

    (method (highlight param1)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
        )(else
            DrawCel(view loop cel nsLeft nsTop -1)
        )
    )

)
(instance iconOk of IconI
    (properties
        view 933
        loop 8
        cel 0
        nsLeft 8
        nsTop 108
        cursor 949
        message 9
        signal $01c3
        noun 18
        modNum 25
        helpVerb 9
    )

    (method (highlight param1)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
        )(else
            DrawCel(view loop cel nsLeft nsTop -1)
        )
    )

)
