home *** CD-ROM | disk | FTP | other *** search
- package com.livebrush.ui
- {
- import com.livebrush.graphics.canvas.Canvas;
- import com.livebrush.utils.Update;
-
- public class SaveImageView extends UIView
- {
- public var data:Object;
-
- public var panelAsset:WindowAssetUI;
-
- public var enableDrag:Boolean = true;
-
- public var uiAsset:SaveImageUI;
-
- public function SaveImageView(ui:UI, data:Object = null)
- {
- super(ui);
- helpID = "saveImage";
- this.data = data;
- init();
- }
-
- override public function die() : void
- {
- this.saveImageController.die();
- UI.WINDOW_HOLDER.removeChild(this.panelAsset);
- this.panelAsset.removeChild(this.uiAsset);
- this.panelAsset = null;
- this.uiAsset = null;
- }
-
- override protected function createView() : void
- {
- this.panelAsset = new WindowAssetUI();
- this.panelAsset.cacheAsBitmap = true;
- this.panelAsset.titleBtn.useHandCursor = false;
- this.uiAsset = new SaveImageUI();
- this.panelAsset.bg.width = 420;
- this.panelAsset.bg.height = 150;
- this.panelAsset.title.text = "Save Image";
- this.panelAsset.helpBtn.visible = this.panelAsset.helpBtn.enabled = false;
- this.panelAsset.toggleBtn.visible = this.panelAsset.toggleBtn.enabled = false;
- this.enableDrag = true;
- this.uiAsset.sizeList.rowCount = 3;
- for(var i:int = 0; i < Canvas.sizeDPI.length; i++)
- {
- this.uiAsset.sizeList.addItem(Canvas.sizeDPI[i]);
- }
- this.uiAsset.sizeList.selectedIndex = 0;
- this.uiAsset.x = 17;
- this.uiAsset.y = 38;
- this.uiAsset.cacheAsBitmap = true;
- this.panelAsset.addChild(this.uiAsset);
- this.panelAsset.x = UI.centerX - this.panelAsset.width / 2;
- this.panelAsset.y = UI.centerY - this.panelAsset.height / 2;
- UI.WINDOW_HOLDER.addChild(this.panelAsset);
- }
-
- override protected function createController() : void
- {
- controller = new SaveImageController(this);
- }
-
- override public function update(update:Update = null) : void
- {
- }
-
- public function get saveImageController() : SaveImageController
- {
- return SaveImageController(controller);
- }
- }
- }
-
-