diff --git a/templates/ios/Launch Screen.storyboard b/templates/ios/Launch Screen.storyboard index b0dee1b6c..d6b5d69ef 100644 --- a/templates/ios/Launch Screen.storyboard +++ b/templates/ios/Launch Screen.storyboard @@ -25,7 +25,7 @@ diff --git a/tools/nme/src/platforms/IOSPlatform.hx b/tools/nme/src/platforms/IOSPlatform.hx index d0ad7b7cb..534d528f4 100644 --- a/tools/nme/src/platforms/IOSPlatform.hx +++ b/tools/nme/src/platforms/IOSPlatform.hx @@ -194,6 +194,11 @@ ${hxcpp_include}'; context.TINT_BLUE = ((col) & 0xff) / 0xff; context.TINT_ALPHA = 1; + var txtCol:Int = project.window.foreground; + context.FG_TINT_RED = ((txtCol>>16) & 0xff) / 0xff; + context.FG_TINT_GREEN = ((txtCol>>8) & 0xff) / 0xff; + context.FG_TINT_BLUE = ((txtCol) & 0xff) / 0xff; + var devTeam = project.getDef("DEVELOPMENT_TEAM"); if (devTeam!=null) context.DEVELOPMENT_TEAM = devTeam; diff --git a/tools/nme/src/project/NMMLParser.hx b/tools/nme/src/project/NMMLParser.hx index eb07ca9b5..50903748f 100644 --- a/tools/nme/src/project/NMMLParser.hx +++ b/tools/nme/src/project/NMMLParser.hx @@ -1165,6 +1165,13 @@ class NMMLParser value = "0x" + value; project.window.background = Std.parseInt(value); + case "foreground": + value = StringTools.replace(value, "#", ""); + if (value.indexOf("0x") == -1) + value = "0x" + value; + project.window.foreground = Std.parseInt(value); + + case "orientation": var orientation = Reflect.field(Orientation, Std.string(value).toUpperCase()); if (orientation != null) diff --git a/tools/nme/src/project/Window.hx b/tools/nme/src/project/Window.hx index 69b9a7243..71831839d 100644 --- a/tools/nme/src/project/Window.hx +++ b/tools/nme/src/project/Window.hx @@ -4,6 +4,7 @@ class Window public var width:Int; public var height:Int; public var background:Int; + public var foreground:Int; public var parameters:String; public var fps:Int; public var hardware:Bool; @@ -28,6 +29,7 @@ class Window height = 600; parameters = "{}"; background = 0xFFFFFF; + foreground = 0x000000; fps = 30; hardware = true; resizable = true;