Permalink
Browse files

Add SubGeometryPropertiesEditor

  • Loading branch information...
1 parent ec440b0 commit ed61242aa1d44b13dbc2ee0945add771485ff658 @80prozent 80prozent committed Jun 23, 2013
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<editors:EditorBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="awaybuilder.view.components.*" xmlns:controls="awaybuilder.view.components.controls.*"
+ xmlns:editors="awaybuilder.view.components.editors.*" xmlns:mx="library://ns.adobe.com/flex/mx"
+ currentState="{_asset.type}">
+ <editors:states>
+ <s:State name="CompactSubGeometry"/>
+ <s:State name="SubGeometry"/>
+ <s:State name="SkinnedSubGeometry"/>
+ </editors:states>
+ <fx:Declarations>
+ </fx:Declarations>
+ <fx:Script><![CDATA[
+ import awaybuilder.model.vo.scene.SubGeometryVO;
+ import awaybuilder.view.components.editors.events.PropertyEditorEvent;
+
+ [Bindable]
+ private var _asset:SubGeometryVO;
+
+ override protected function validate(asset:Object):void
+ {
+ if( !(asset is SubGeometryVO) ) return;
+ _asset = SubGeometryVO(asset).clone() as SubGeometryVO;
+ }
+
+ ]]></fx:Script>
+
+
+ <s:Group width="100%" top="0">
+ <s:Rect left="0" right="0" top="3" bottom="3">
+ <s:fill>
+ <s:SolidColor color="0x111111" alpha="0.3"/>
+ </s:fill>
+ </s:Rect>
+ <s:HGroup width="100%" verticalAlign="middle" paddingLeft="2" paddingRight="2" paddingTop="4" paddingBottom="4">
+ <s:Button id="editParentObjectButton" styleName="editParentObjectButtonStyle" visible="{prevSelected.length>0}"
+ width="32" height="32" click="editParentObjectButton_clickHandler(event)"/>
+ <s:Label width="100%" text="SubGeometry" fontWeight="bold" fontSize="14"/>
+ </s:HGroup>
+ </s:Group>
+
+ <s:Form width="100%" skinClass="awaybuilder.view.skins.PropertyFormSkin">
+ <s:FormItem label="Name" skinClass="awaybuilder.view.skins.PropertyFormItemSkin" width="100%">
+ <s:Label width="100%" text="{_asset.name}" fontSize="12"/>
+ </s:FormItem>
+ <s:FormItem label="" skinClass="awaybuilder.view.skins.PropertyFormItemSkin" width="100%"/>
+ <s:FormItem label="Type" skinClass="awaybuilder.view.skins.PropertyFormItemSkin" width="100%">
+ <s:Label width="100%" text="{_asset.type}" fontSize="12"/>
+ </s:FormItem>
+ <s:FormItem label="" skinClass="awaybuilder.view.skins.PropertyFormItemSkin" width="100%"/>
+ <s:FormItem label="Points" skinClass="awaybuilder.view.skins.PropertyFormItemSkin" width="100%" >
+ <s:Label width="100%" text="{_asset.numVerts}" fontSize="12"/>
+ </s:FormItem>
+ <s:FormItem label="Faces" skinClass="awaybuilder.view.skins.PropertyFormItemSkin" width="100%">
+ <s:Label width="100%" text="{_asset.numTris}" fontSize="12"/>
+ </s:FormItem>
+ </s:Form>
+ <s:Form width="100%" skinClass="awaybuilder.view.skins.PropertyFormSkin">
+ <s:FormItem label="" skinClass="awaybuilder.view.skins.PropertyFormItemSkin" width="100%"/>
+ <s:FormItem label="AutoDerived-Normals" skinClass="awaybuilder.view.skins.PropertyFormItemSkin" width="100%">
+ <s:Label width="100%" text="{_asset.autoDerivedNormals}" fontSize="12"/>
+ </s:FormItem>
+ <s:FormItem label="AutoDerived-Tangents" skinClass="awaybuilder.view.skins.PropertyFormItemSkin" width="100%">
+ <s:Label width="100%" text="{_asset.autoDerivedTangents}" fontSize="12"/>
+ </s:FormItem>
+
+ </s:Form>
+
+</editors:EditorBase>

0 comments on commit ed61242

Please sign in to comment.