First cut at styling TIGER data via an option. Needs lots of propagation of uid and...
[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     import net.systemeD.halcyon.Globals;
12     
13     public function init():void {
14         PopUpManager.addPopUp(this, Application(Application.application), true);
15         PopUpManager.centerPopUp(this);
16         this.addEventListener(CloseEvent.CLOSE, optionsDialog_close);
17                 tbcheck.selected=Application.application.toolbox.visible;
18                 cursorcheck.selected=Application.application.theController.cursorsEnabled;
19     }
20     
21     private function optionsDialog_close(evt:CloseEvent):void {
22         PopUpManager.removePopUp(this);
23     }
24
25     private function tigerToggle():void {
26         Globals.vars.highlightTiger = tigercheck.selected;
27         Application.application.theMap.redraw();
28     }
29
30               ]]>
31   </mx:Script>
32         <mx:CheckBox width="100%" label="Show toolbox" selected="true" id="tbcheck"
33             change="Application.application.toolbox.toggle()" />
34
35         <mx:CheckBox width="100%" label="Use custom cursors" selected="true" id="cursorcheck"
36             change="Application.application.theController.cursorsEnabled=cursorcheck.selected" />
37
38     <mx:CheckBox width="100%" label="Highlight Unedited TIGER" selected="false" id="tigercheck"
39         change="tigerToggle()" />
40
41   <mx:ControlBar>
42     <mx:Spacer width="100%"/>
43     <mx:Button label="Ok" click="PopUpManager.removePopUp(this);"/>
44   </mx:ControlBar>
45
46 </mx:TitleWindow>