Created
January 2, 2013 23:32
-
-
Save cameronmcefee/4439382 to your computer and use it in GitHub Desktop.
Here's a snipped from my ui color switcher. Right now it's dependent on the CSXSInterface to get the info. I need to figure out if there's a way to get the info without it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the color from the app | |
var i:Number = 0; | |
var uiObjects:Array = new Array(); | |
var uiResult:SyncRequestResult = CSXSInterface.instance.getHostEnvironment(); | |
var hostData:HostEnvironment = uiResult.data; | |
var skinInfo:AppSkinInfo = hostData.appSkinInfo; | |
var appUILightness:Number; | |
// Color value from the ui | |
defaultColor = skinInfo.panelBackgroundColor.color.rgb; | |
// Color value from the ui on a scale of 0 (black) to 1(white) | |
// Elsewhere in my code I test against it | |
// | |
// uiColor = (appUILightness>.5) ? 0xffffff : 0x000000 | |
appUILightness = defaultColor/16777215 | |
this.setStyle("backgroundGradientColors", [defaultColor, defaultColor]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment