Skip to content

Commit

Permalink
Skin issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nczakaria committed Aug 11, 2015
1 parent 59c8069 commit 35b3dde
Show file tree
Hide file tree
Showing 50 changed files with 1,388 additions and 1,639 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<![CDATA[
import sg.edu.smu.ksketch2.KSketch2;
import sg.edu.smu.ksketch2.utils.ExportUtil;
import sg.edu.smu.ksketch2.KSketchStyles;
import sg.edu.smu.ksketch2.KSketchGlobals;
import sg.edu.smu.ksketch2.utils.KSketchDocument;
Expand Down Expand Up @@ -58,7 +58,7 @@
</s:Line>
<s:Group width="100%">
<s:layout>
<s:VerticalLayout paddingTop="KSketchStyles.PADDING_05" paddingLeft="KSketchStyles.PADDING_05"/>
<s:VerticalLayout paddingTop="KSketchGlobals.PADDING_05" paddingLeft="KSketchGlobals.PADDING_05"/>
</s:layout>
<s:Label color="0x9F9F9F" width="{width*0.95}" id="currentDocDescription" fontSize="24"/>
</s:Group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<fx:Script>
<![CDATA[
import sg.edu.smu.ksketch2.KSketchStyles;
import sg.edu.smu.ksketch2.KSketchGlobals;
]]>
</fx:Script>
<!-- states -->
Expand Down Expand Up @@ -37,7 +37,7 @@
</s:Rect>
<s:Group width="100%" height="100%">
<s:layout>
<s:HorizontalLayout paddingLeft="KSketchStyles.PADDING_10" paddingRight="KSketchStyles.PADDING_10" paddingTop="KSketchStyles.PADDING_10" paddingBottom="KSketchStyles.PADDING_10"/>
<s:HorizontalLayout paddingLeft="KSketchGlobals.PADDING_10" paddingRight="KSketchGlobals.PADDING_10" paddingTop="KSketchGlobals.PADDING_10" paddingBottom="KSketchGlobals.PADDING_10"/>
</s:layout>
<s:Label id="labelDisplay" fontSize="{24}" fontFamily="_sans" color="0xA8A8A8"/>
</s:Group>
Expand Down
1 change: 0 additions & 1 deletion KSKInterface/.flexLibProperties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<classEntry path="sg.edu.smu.ksketch2.canvas.components.popup.KSketch_ImageImport_Control"/>
<classEntry path="sg.edu.smu.ksketch2.canvas.components.buttons.KSketch_Dialog_Button_Skin"/>
<classEntry path="sg.edu.smu.ksketch2.canvas.components.timebar.KSketch_TimeLabelBar"/>
<classEntry path="sg.edu.smu.ksketch2.canvas.components.buttons.KSketch_OnOff_Toggle"/>
<classEntry path="sg.edu.smu.ksketch2.canvas.components.timebar.KSketch_TimeLabel"/>
<classEntry path="sg.edu.smu.ksketch2.canvas.components.popup.KSketch_Timebar_Context_Double"/>
<classEntry path="sg.edu.smu.ksketch2.canvas.components.popup.KSketch_Widget_ContextMenu"/>
Expand Down
Binary file modified KSKInterface/src/assets/Help_KSketch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
97 changes: 97 additions & 0 deletions KSKInterface/src/sg/edu/smu/ksketch2/KSketchGlobals.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/**
* Copyright 2010-2012 Singapore Management University
* Developed under a grant from the Singapore-MIT GAMBIT Game Lab
* This Source Code Form is subject to the terms of the
* Mozilla Public License, v. 2.0. If a copy of the MPL was
* not distributed with this file, You can obtain one at
* http://mozilla.org/MPL/2.0/.
*/
package sg.edu.smu.ksketch2
{
import flash.system.Capabilities;

public class KSketchGlobals
{
//Color
public static const COLOR_WHITE:uint = 0xFFFFFF;
public static const COLOR_BLACK:uint = 0x000000;
public static const COLOR_RED_LIGHT:uint = 0xDD1F26;
public static const COLOR_RED:uint = 0xFF0000;
public static const COLOR_RED_DARK:uint = 0x6B0000;
public static const COLOR_GREY_VERYLIGHT:uint = 0xD0D2D3;
public static const COLOR_GREY_LIGHT:uint = 0xC8CCCE;
public static const COLOR_GREY_MEDIUM:uint = 0xA6A8AB;
public static const COLOR_GREY_DARK:uint = 0x505050;
public static const COLOR_BLUE:uint = 0x0000FF;
public static const COLOR_GREEN:uint = 0x00FF00;

//Alpha
public static const ALPHA_00:Number = 0;
public static const ALPHA_02:Number = 0.2;
public static const ALPHA_04:Number = 0.4;
public static const ALPHA_05:Number = 0.5;
public static const ALPHA_06:Number = 0.6;
public static const ALPHA_1:Number = 1;

//Angle
public static const ANGLE_50:Number = 50;

//Font sizes
public static const FONT_FAMILY:String = "Arial, Helvetica";
public static var FONT_SIZE_10:Number = 10;
public static var FONT_SIZE_10_5:Number = 10.5;
public static var FONT_SIZE_14:Number = 14;
public static var FONT_SIZE_18:Number = 18;
public static var FONT_SIZE_20:Number = 20;
public static var FONT_SIZE_26:Number = 26;
public static var FONT_SIZE_60:Number = 60;
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 var RECT_RADIUSX:Number = 5;
public static var RECT_RADIUSY:Number = 5;

//Scaling
public static var SCALE:Number = 1;
public static var WIDTH:int = 0;
public static var HEIGHT:int = 0;
public static var ASPECTRATIO:Number = 0;

public static function setView():void
{
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_STRENGTH = 1 * SCALE;
RECT_BLURX = 12 * SCALE;
RECT_BLURY = 12 * SCALE;
RECT_RADIUSX = 5 * SCALE;
RECT_RADIUSY = 5 * SCALE;
}
}
}
162 changes: 0 additions & 162 deletions KSKInterface/src/sg/edu/smu/ksketch2/KSketchStyles.as

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*http://mozilla.org/MPL/2.0/.
-->
<s:Button xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="{height}" height="100%" initialize="initSkin()"
xmlns:s="library://ns.adobe.com/flex/spark" initialize="initSkin()"
skinClass="sg.edu.smu.ksketch2.canvas.components.buttons.KSketch_Canvas_Button_Skin">
<fx:Script>
<![CDATA[
Expand All @@ -35,12 +35,6 @@
var textureControl:Image = (skin as Object).texture;
if(_fullScale)
{
textureControl.percentWidth = 100;
textureControl.percentHeight = 100;
}
textureControl.source = _up;
skin.addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE, _onStateChange);
}
Expand Down
Loading

0 comments on commit 35b3dde

Please sign in to comment.