we have an option!
[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     }
18     
19     private function optionsDialog_close(evt:CloseEvent):void {
20         PopUpManager.removePopUp(this);
21     }
22
23               ]]>
24   </mx:Script>
25         <mx:CheckBox width="100%" label="Show toolbox" selected="true" id="tbcheck"
26             change="Application.application.toolbox.toggle()" />
27
28   <mx:ControlBar>
29     <mx:Spacer width="100%"/>
30     <mx:Button label="Ok" click="PopUpManager.removePopUp(this);"/>
31   </mx:ControlBar>
32
33 </mx:TitleWindow>