-
Notifications
You must be signed in to change notification settings - Fork 8
/
DebugView.mxml
42 lines (36 loc) · 1.8 KB
/
DebugView.mxml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:local="*"
creationComplete="handleCreationComplete()" xmlns:mx1="library://ns.adobe.com/flex/mx" xmlns:view="org.openpalace.iptscrae.view.*">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import net.codecomposer.palace.model.PalaceHotspot;
import net.codecomposer.palace.rpc.PalaceClient;
[Bindable]
private var client:PalaceClient = PalaceClient.getInstance();
private function handleCreationComplete():void {
debugModeCheckbox.selected = client.palaceController.scriptManager.debugMode;
}
private function handleDebugModeCheckboxChange():void {
client.palaceController.scriptManager.debugMode = debugModeCheckbox.selected;
}
]]>
</fx:Script>
<s:VGroup paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" gap="5" width="100%" height="100%">
<s:CheckBox id="debugModeCheckbox" label="Debug Mode" change="handleDebugModeCheckboxChange()" />
<s:HGroup verticalAlign="middle">
<s:Label text="Hotspot:" />
<s:ComboBox id="hotspotList" dataProvider="{client.debugData.hotspots}" change="eventHandlerList.selectedIndex = 0;" />
</s:HGroup>
<s:HGroup verticalAlign="middle">
<s:Label text="Event:" />
<s:ComboBox id="eventHandlerList" dataProvider="{client.debugData.eventHandlers(PalaceHotspot(hotspotList.selectedItem))}" />
</s:HGroup>
<mx1:Text width="100%" height="50%" text="{IptEventHandler(eventHandlerList.selectedItem).script}" />
<view:DebugConsole iptManager="{client.palaceController.scriptManager}" width="100%" height="50%" />
</s:VGroup>
</s:Group>