diff --git a/KSKInterface/src/assets/Button_Texture_Pause.png b/KSKInterface/src/assets/Button_Texture_Pause.png index 194a6f52..6c49db75 100644 Binary files a/KSKInterface/src/assets/Button_Texture_Pause.png and b/KSKInterface/src/assets/Button_Texture_Pause.png differ diff --git a/KSKInterface/src/assets/Button_Texture_Play.png b/KSKInterface/src/assets/Button_Texture_Play.png index 45eede4b..d6deea97 100644 Binary files a/KSKInterface/src/assets/Button_Texture_Play.png and b/KSKInterface/src/assets/Button_Texture_Play.png differ diff --git a/KSKInterface/src/sg/edu/smu/ksketch2/KSketchGlobals.as b/KSKInterface/src/sg/edu/smu/ksketch2/KSketchGlobals.as index 345ff297..0ef6bb0b 100755 --- a/KSKInterface/src/sg/edu/smu/ksketch2/KSketchGlobals.as +++ b/KSKInterface/src/sg/edu/smu/ksketch2/KSketchGlobals.as @@ -48,9 +48,9 @@ package sg.edu.smu.ksketch2 public static var FONT_SIZE_300:Number = 300; //Main rectangle - public static var RECT_STRENGTH:Number = 1; - public static var RECT_BLURX:Number = 12; - public static var RECT_BLURY:Number = 12; + public static const RECT_STRENGTH:Number = 1; + public static const RECT_BLURX:Number = 12; + public static const RECT_BLURY:Number = 12; public static var RECT_RADIUSX:Number = 5; public static var RECT_RADIUSY:Number = 5; @@ -62,36 +62,38 @@ package sg.edu.smu.ksketch2 public static function setView():void { - if(Capabilities.screenResolutionX > Capabilities.screenResolutionY) - { - WIDTH = Capabilities.screenResolutionX; - HEIGHT = Capabilities.screenResolutionY; - } - else + + if(Capabilities.playerType != "PlugIn") { - WIDTH = Capabilities.screenResolutionY; - HEIGHT = Capabilities.screenResolutionX; + if(Capabilities.screenResolutionX > Capabilities.screenResolutionY) + { + WIDTH = Capabilities.screenResolutionX; + HEIGHT = Capabilities.screenResolutionY; + } + else + { + WIDTH = Capabilities.screenResolutionY; + HEIGHT = Capabilities.screenResolutionX; + } + + ASPECTRATIO = int((WIDTH/HEIGHT)*100)/100; + + if(WIDTH > 1280 && HEIGHT > 960) + SCALE = 2; + + FONT_SIZE_10 = 10 * SCALE; + FONT_SIZE_10_5 = 10.5 * SCALE; + FONT_SIZE_14 = 14 * SCALE; + FONT_SIZE_18 = 18 * SCALE; + FONT_SIZE_20 = 20 * SCALE; + FONT_SIZE_26 = 26 * SCALE; + FONT_SIZE_60 = 60 * SCALE; + FONT_SIZE_300 = 300 * SCALE; + + RECT_RADIUSX = 5 * SCALE; + RECT_RADIUSY = 5 * SCALE; } - ASPECTRATIO = int((WIDTH/HEIGHT)*100)/100; - - if(WIDTH > 1280 && HEIGHT > 960) - SCALE = 2; - - FONT_SIZE_10 = 10 * SCALE; - FONT_SIZE_10_5 = 10.5 * SCALE; - FONT_SIZE_14 = 14 * SCALE; - FONT_SIZE_18 = 18 * SCALE; - FONT_SIZE_20 = 20 * SCALE; - FONT_SIZE_26 = 26 * SCALE; - FONT_SIZE_60 = 60 * SCALE; - FONT_SIZE_300 = 300 * SCALE; - - RECT_STRENGTH = 1 * SCALE; - RECT_BLURX = 12 * SCALE; - RECT_BLURY = 12 * SCALE; - RECT_RADIUSX = 5 * SCALE; - RECT_RADIUSY = 5 * SCALE; } } } \ No newline at end of file diff --git a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_Canvas_Button_Skin.mxml b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_Canvas_Button_Skin.mxml index 7806bf46..67c4881a 100755 --- a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_Canvas_Button_Skin.mxml +++ b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_Canvas_Button_Skin.mxml @@ -48,8 +48,7 @@ [Bindable] public var upColor:uint = KSketchGlobals.COLOR_GREY_LIGHT; - private var BUTTONWIDTH:Number = 50 * KSketchGlobals.SCALE; - private var BUTTONHEIGHT:Number = 50 * KSketchGlobals.SCALE; + private var BUTTONDIMENSION:Number = 55 * KSketchGlobals.SCALE; ]]> @@ -64,7 +63,7 @@ - + diff --git a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_DialogButton.mxml b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_DialogButton.mxml index 6dd18d2d..644f1564 100755 --- a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_DialogButton.mxml +++ b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_DialogButton.mxml @@ -14,7 +14,6 @@ @@ -56,7 +56,7 @@ - + @@ -64,7 +64,9 @@ - + diff --git a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_ListButton.mxml b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_ListButton.mxml index 5e6b3b27..5c78d03f 100755 --- a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_ListButton.mxml +++ b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_ListButton.mxml @@ -9,7 +9,7 @@ *http://mozilla.org/MPL/2.0/. --> [HostComponent("spark.components.Button")] - diff --git a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_Play_Button.mxml b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_Play_Button.mxml index a825f8cb..db2374fb 100755 --- a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_Play_Button.mxml +++ b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/buttons/KSketch_Play_Button.mxml @@ -136,7 +136,6 @@ private function set buttonState(value:int):void { var textureControl:Image = (skin as KSketch_Canvas_Button_Skin).texture; - _buttonState = value; if(_buttonState == SHOW_PLAY) @@ -145,6 +144,8 @@ textureControl.source = KSketchAssets.texture_pause; (skin as KSketch_Canvas_Button_Skin).upColor = KSketchGlobals.COLOR_RED; + (skin as KSketch_Canvas_Button_Skin).width = 60 * KSketchGlobals.SCALE; + (skin as KSketch_Canvas_Button_Skin).height = 60 * KSketchGlobals.SCALE; } ]]> diff --git a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/popup/KSketch_PopUp_Menu.mxml b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/popup/KSketch_PopUp_Menu.mxml index f2ce9263..ed0e11a4 100755 --- a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/popup/KSketch_PopUp_Menu.mxml +++ b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/popup/KSketch_PopUp_Menu.mxml @@ -103,11 +103,11 @@ helpButton.init(KSketchAssets.texture_help, KSketchAssets.texture_help_down, false); helpButton.initSkin(); - if((Capabilities.version.indexOf('IOS') > -1) || (Capabilities.os.toLowerCase().indexOf("mac") == -1)) + /*if((Capabilities.version.indexOf('IOS') > -1) || (Capabilities.os.toLowerCase().indexOf("mac") == -1)) shareButton.init(KSketchAssets.texture_share_ios, KSketchAssets.texture_share_ios_down, false); else shareButton.init(KSketchAssets.texture_share_android, KSketchAssets.texture_share_android_down, false); - shareButton.initSkin(); + shareButton.initSkin();*/ if(_saveOptions) { @@ -550,9 +550,11 @@ id="helpButton" /> + diff --git a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/timebar/KSketch_TimeSkip_Button.mxml b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/timebar/KSketch_TimeSkip_Button.mxml index 9f00f83c..fd240012 100755 --- a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/timebar/KSketch_TimeSkip_Button.mxml +++ b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/timebar/KSketch_TimeSkip_Button.mxml @@ -24,7 +24,6 @@ import sg.edu.smu.ksketch2.KSketch2; import sg.edu.smu.ksketch2.KSketchAssets; - import sg.edu.smu.ksketch2.KSketchGlobals; import sg.edu.smu.ksketch2.canvas.components.buttons.KSketch_Canvas_Button_Skin; import sg.edu.smu.ksketch2.canvas.components.view.KSketch_CanvasView; diff --git a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/view/KSketch_CanvasView.mxml b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/view/KSketch_CanvasView.mxml index a0878440..00294085 100755 --- a/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/view/KSketch_CanvasView.mxml +++ b/KSKInterface/src/sg/edu/smu/ksketch2/canvas/components/view/KSketch_CanvasView.mxml @@ -36,9 +36,7 @@ import mx.graphics.codec.JPEGEncoder; import mx.managers.PopUpManager; import mx.utils.Base64Encoder; - - import sg.edu.smu.ksketch2.KSketch_Config; - + import spark.events.ViewNavigatorEvent; import spark.managers.PersistenceManager; @@ -47,6 +45,7 @@ import sg.edu.smu.ksketch2.KSketch2; import sg.edu.smu.ksketch2.KSketchAssets; import sg.edu.smu.ksketch2.KSketchGlobals; + import sg.edu.smu.ksketch2.KSketch_Config; import sg.edu.smu.ksketch2.canvas.KSketch_CanvasView_Preferences; import sg.edu.smu.ksketch2.canvas.components.popup.KSketch_Alert; import sg.edu.smu.ksketch2.canvas.components.popup.KSketch_DialogBox_Skin; @@ -74,6 +73,7 @@ import sg.edu.smu.ksketch2.model.objects.KGroup; import sg.edu.smu.ksketch2.model.objects.KInstructions; import sg.edu.smu.ksketch2.model.objects.KObject; + import sg.edu.smu.ksketch2.model.objects.KStroke; import sg.edu.smu.ksketch2.operators.operations.KCompositeOperation; import sg.edu.smu.ksketch2.utils.KIOEvent; @@ -82,6 +82,7 @@ private var DRAWINGSTAGE_BORDER:Number = 1 * KSketchGlobals.SCALE; private var TIMEBAR_GAP:Number = 4 * KSketchGlobals.SCALE; private var TIMEBAR_PADDING:Number = 5 * KSketchGlobals.SCALE; + private var TIMEBAR_PLAYDIMENSION:Number = 60 * KSketchGlobals.SCALE; private var SYNPHNE_PADDINGTOP:Number = 10 * KSketchGlobals.SCALE; private var SYNPHNE_PADDINGRIGHT:Number = 5 * KSketchGlobals.SCALE; private var SYNPHNE_TIMERLABEL_WIDTH:Number = 100 * KSketchGlobals.SCALE; @@ -249,13 +250,17 @@ //Initiate the controls if(!isPlayer) { - _transitionHelper = new KWidgetInteractorManager(_KSketch, _interactionControl, widget, modelDisplay); - //KSKETCH-SYNPHNE if(!isSynphne) + { + _transitionHelper = new KWidgetInteractorManager(_KSketch, _interactionControl, null, widget, modelDisplay); _selectionHelper = new KCanvasInteractorManager(_KSketch, _interactionControl, null, canvas_region, modelDisplay, motionDisplay, _feedbackPopUp); + } else + { + _transitionHelper = new KWidgetInteractorManager(_KSketch, _interactionControl, _activityControl, widget, modelDisplay); _selectionHelper = new KCanvasInteractorManager(_KSketch, _interactionControl, _activityControl, canvas_region, modelDisplay, motionDisplay, _feedbackPopUp); + } } if(!isWeb) @@ -684,21 +689,18 @@ public function resetTimeControl():void { _KSketch.time = 0; - //_magnifier.setToTime(_KSketch.time); + _magnifier.setToTime(_KSketch.time); } - public function autoPlayAnimation():void + public function get timeTaken():int { - playButton.playToggle(true); - _activityControl.autoSelectObjectToAnimate(); + return _timeTaken; //in milliseconds } - public function get activityType():String + public function autoPlayAnimation():void { - var activityType:String = "SKETCH"; - if(_activityControl) - activityType = _activityControl.activityType; - return activityType; + playButton.playToggle(true); + _activityControl.autoSelectObjectToAnimate(); } public function setAnimationPlaying(value:Boolean):void @@ -737,6 +739,10 @@ return regionsArr; } + public function get starValueArr():Array + { + return _options.starValueArr; + } public function getCurrentTemplateObjectView():IObjectView { @@ -744,10 +750,10 @@ for(var i:int=0; i<_KSketch.root.children.length(); i++) { var currObj:KObject = _KSketch.root.children.getObjectAt(i) as KObject; - /*if(currObj is KStroke && currObj.id == currentId) + if(currObj is KStroke && currObj.id == currentId) { return modelDisplay.viewsTable[currObj]; - }*/ + } } return null; }