home *** CD-ROM | disk | FTP | other *** search
- package com.livebrush.ui
- {
- import com.livebrush.data.GlobalSettings;
- import com.livebrush.utils.Update;
-
- public class GlobalSettingsView extends UIView
- {
- public var data:Object;
-
- public var panelAsset:WindowAssetUI;
-
- public var enableDrag:Boolean = true;
-
- public var uiAsset:SettingsUI;
-
- public function GlobalSettingsView(ui:UI, data:Object = null)
- {
- super(ui);
- helpID = "prefs";
- this.data = data;
- init();
- }
-
- override public function die() : void
- {
- this.globalSettingsController.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 SettingsUI();
- this.panelAsset.bg.width = 420;
- this.panelAsset.bg.height = 350;
- this.panelAsset.title.text = "Settings";
- this.panelAsset.helpBtn.visible = this.panelAsset.helpBtn.enabled = false;
- this.panelAsset.toggleBtn.visible = this.panelAsset.toggleBtn.enabled = false;
- this.enableDrag = true;
- this.uiAsset.cacheDelay.restrict = "0123456789.";
- this.uiAsset.cacheVectors.selected = GlobalSettings.CACHE_REALTIME;
- this.uiAsset.cacheDecos.selected = GlobalSettings.CACHE_DECOS;
- this.uiAsset.checkForUpdates.selected = GlobalSettings.CHECK_FOR_UPDATES;
- this.uiAsset.showBusyWarnings.selected = GlobalSettings.SHOW_BUSY_WARNINGS;
- this.uiAsset.cacheDelay.text = String(GlobalSettings.CACHE_DELAY / 1000);
- 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);
- }
-
- public function get globalSettingsController() : GlobalSettingsController
- {
- return GlobalSettingsController(controller);
- }
-
- override protected function createController() : void
- {
- controller = new GlobalSettingsController(this);
- }
-
- override public function update(update:Update = null) : void
- {
- }
- }
- }
-
-