From aa8f624f34b01f402c67d446971276beb55d21df Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Wed, 25 Mar 2015 22:01:29 -0700 Subject: [PATCH] HTML5 stats fix, code completion fix --- lime/_backend/html5/HTML5Application.hx | 7 +++++-- lime/text/Font.hx | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lime/_backend/html5/HTML5Application.hx b/lime/_backend/html5/HTML5Application.hx index 7f75e956c..20acf56fc 100644 --- a/lime/_backend/html5/HTML5Application.hx +++ b/lime/_backend/html5/HTML5Application.hx @@ -22,6 +22,9 @@ class HTML5Application { private var cacheTime:Float; private var parent:Application; + #if stats + private var stats:Dynamic; + #end public inline function new (parent:Application) { @@ -181,7 +184,7 @@ class HTML5Application { private function handleUpdateEvent (?__):Void { #if stats - parent.window.stats.begin (); + stats.begin (); #end var currentTime = Date.now ().getTime (); @@ -198,7 +201,7 @@ class HTML5Application { } #if stats - parent.window.stats.end (); + stats.end (); #end Browser.window.requestAnimationFrame (cast handleUpdateEvent); diff --git a/lime/text/Font.hx b/lime/text/Font.hx index 316420d11..9b0bfa6b3 100644 --- a/lime/text/Font.hx +++ b/lime/text/Font.hx @@ -14,7 +14,10 @@ import js.html.CanvasRenderingContext2D; #end @:access(lime.text.Glyph) + +#if !display @:autoBuild(lime.Assets.embedFont()) +#end class Font {