Minor improvements, compile fix
This commit is contained in:
@@ -133,7 +133,7 @@ class Preloader #if flash extends Sprite #end {
|
||||
|
||||
if (untyped (Browser.document).fonts && untyped (Browser.document).fonts.load) {
|
||||
|
||||
untyped (Browser.document).fonts.load ("1em '" + font + "'").then (function () {
|
||||
untyped (Browser.document).fonts.load ("1em '" + font + "'").then (function (_) {
|
||||
|
||||
loaded ++;
|
||||
update (loaded, total);
|
||||
|
||||
@@ -85,7 +85,7 @@ class Font {
|
||||
}
|
||||
|
||||
|
||||
public function getGlyphs (characters:String):Array<Glyph> {
|
||||
public function getGlyphs (characters:String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^`'\"/\\&*()[]{}<>|:;_-+=?,. "):Array<Glyph> {
|
||||
|
||||
#if (cpp || neko || nodejs)
|
||||
return lime_font_get_glyph_indices (__handle, characters);
|
||||
|
||||
@@ -106,6 +106,8 @@ class TextLayout {
|
||||
|
||||
@:noCompletion private function set_direction (value:TextDirection):TextDirection {
|
||||
|
||||
if (value == __direction) return value;
|
||||
|
||||
__direction = value;
|
||||
|
||||
#if (cpp || neko || nodejs)
|
||||
@@ -121,6 +123,8 @@ class TextLayout {
|
||||
|
||||
@:noCompletion private function set_font (value:Font):Font {
|
||||
|
||||
if (value == this.font) return value;
|
||||
|
||||
this.font = value;
|
||||
__position ();
|
||||
return value;
|
||||
@@ -152,6 +156,8 @@ class TextLayout {
|
||||
|
||||
@:noCompletion private function set_language (value:String):String {
|
||||
|
||||
if (value == __language) return value;
|
||||
|
||||
__language = value;
|
||||
|
||||
#if (cpp || neko || nodejs)
|
||||
@@ -174,6 +180,8 @@ class TextLayout {
|
||||
|
||||
@:noCompletion private function set_script (value:TextScript):TextScript {
|
||||
|
||||
if (value == __script) return value;
|
||||
|
||||
__script = value;
|
||||
|
||||
#if (cpp || neko || nodejs)
|
||||
@@ -189,6 +197,8 @@ class TextLayout {
|
||||
|
||||
@:noCompletion private function set_size (value:Int):Int {
|
||||
|
||||
if (value == this.size) return value;
|
||||
|
||||
this.size = value;
|
||||
__position ();
|
||||
return value;
|
||||
@@ -198,6 +208,8 @@ class TextLayout {
|
||||
|
||||
@:noCompletion private function set_text (value:String):String {
|
||||
|
||||
if (value == this.text) return value;
|
||||
|
||||
this.text = value;
|
||||
__position ();
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user