d7367b97a2a9ec5744db308943efeba2a6b42bae
[potlatch2.git] / net / systemeD / potlatch2 / options / OptionsDialog.mxml
1 <?xml version="1.0" encoding="utf-8"?>
2 <mx:TitleWindow
3         xmlns:mx="http://www.adobe.com/2006/mxml" 
4         layout="vertical" showCloseButton="true"
5         horizontalAlign="center" title="Options"
6         width="350" height="250" verticalGap="0">
7   <mx:Script><![CDATA[
8     import mx.managers.PopUpManager;
9     import mx.events.CloseEvent;
10     import mx.core.Application;
11     
12     public function init():void {
13         PopUpManager.addPopUp(this, Application(Application.application), true);
14         PopUpManager.centerPopUp(this);
15         this.addEventListener(CloseEvent.CLOSE, optionsDialog_close);
16                 tbcheck.selected=Application.application.toolbox.visible;
17                 cursorcheck.selected=Application.application.theController.cursorsEnabled;
18     }
19     
20     private function optionsDialog_close(evt:CloseEvent):void {
21         PopUpManager.removePopUp(this);
22     }
23
24               ]]>
25   </mx:Script>
26         <mx:CheckBox width="100%" label="Show toolbox" selected="true" id="tbcheck"
27             change="Application.application.toolbox.toggle()" />
28
29         <mx:CheckBox width="100%" label="Use custom cursors" selected="true" id="cursorcheck"
30             change="Application.application.theController.cursorsEnabled=cursorcheck.selected" />
31
32   <mx:ControlBar>
33     <mx:Spacer width="100%"/>
34     <mx:Button label="Ok" click="PopUpManager.removePopUp(this);"/>
35   </mx:ControlBar>
36
37 </mx:TitleWindow>