fixes
This commit is contained in:
@@ -9,7 +9,6 @@
|
|||||||
"contributors": ["shmyga"],
|
"contributors": ["shmyga"],
|
||||||
"classPath": "src/main",
|
"classPath": "src/main",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"promhx": "",
|
"promhx": ""
|
||||||
"openfl": ""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ class InputTextField extends TextField {
|
|||||||
|
|
||||||
public function new() {
|
public function new() {
|
||||||
super();
|
super();
|
||||||
#if flash
|
//#if flash
|
||||||
type = TextFieldType.INPUT;
|
type = TextFieldType.INPUT;
|
||||||
#elseif js
|
//#elseif js
|
||||||
addEventListener(MouseEvent.CLICK, onMouseClick);
|
//addEventListener(MouseEvent.CLICK, onMouseClick);
|
||||||
#end
|
//#end
|
||||||
}
|
}
|
||||||
|
|
||||||
#if js
|
#if js
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package haxework.gui;
|
package haxework.gui;
|
||||||
|
|
||||||
|
import flash.text.TextFormatAlign;
|
||||||
import haxework.dispath.Dispatcher;
|
import haxework.dispath.Dispatcher;
|
||||||
import haxework.dispath.IDispatcher;
|
import haxework.dispath.IDispatcher;
|
||||||
import flash.events.Event;
|
import flash.events.Event;
|
||||||
@@ -29,6 +30,7 @@ class InputView extends TextView implements IDisposable {
|
|||||||
|
|
||||||
hintTextField = buildHintTextField();
|
hintTextField = buildHintTextField();
|
||||||
contentAsSprite.addChild(hintTextField);
|
contentAsSprite.addChild(hintTextField);
|
||||||
|
textFormat.align = TextFormatAlign.LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
override private function buildTextField():TextField {
|
override private function buildTextField():TextField {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class SpriteView extends View {
|
|||||||
#if dev_layout
|
#if dev_layout
|
||||||
override public function update():Void {
|
override public function update():Void {
|
||||||
super.update();
|
super.update();
|
||||||
var g:Graphics = content.graphics;
|
var g:Graphics = contentAsSprite.graphics;
|
||||||
g.lineStyle(1, 0x00ff00);
|
g.lineStyle(1, 0x00ff00);
|
||||||
g.drawRect(0, 0, width, height);
|
g.drawRect(0, 0, width, height);
|
||||||
g.lineStyle();
|
g.lineStyle();
|
||||||
|
|||||||
@@ -191,12 +191,12 @@ class TextView extends SpriteView implements ITextView {
|
|||||||
placeTextField(textField);
|
placeTextField(textField);
|
||||||
}
|
}
|
||||||
//ToDo:
|
//ToDo:
|
||||||
var t:Point = content.localToGlobal(new Point(textField.x, textField.y));
|
//var t:Point = content.localToGlobal(new Point(textField.x, textField.y));
|
||||||
t.x = Math.round(t.x);
|
//t.x = Math.round(t.x);
|
||||||
t.y = Math.round(t.y);
|
//t.y = Math.round(t.y);
|
||||||
t = content.globalToLocal(t);
|
//t = content.globalToLocal(t);
|
||||||
textField.x = t.x;
|
//textField.x = t.x;
|
||||||
textField.y = t.y;
|
//textField.y = t.y;
|
||||||
super.update();
|
super.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class Builder {
|
|||||||
case "link":
|
case "link":
|
||||||
"(links == null) ? untyped this : Reflect.field(links, \"" + a[1] + "\")";
|
"(links == null) ? untyped this : Reflect.field(links, \"" + a[1] + "\")";
|
||||||
case _:
|
case _:
|
||||||
throw "Unsupported prefix \"" + a[0] + "\"";
|
Context.error("Unsupported prefix \"" + a[0] + "\"", getPosition(position));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +93,12 @@ class Builder {
|
|||||||
if (Reflect.hasField(value, "@type")) {
|
if (Reflect.hasField(value, "@type")) {
|
||||||
var n = "a" + i++;
|
var n = "a" + i++;
|
||||||
var type = Reflect.field(value, "@type");
|
var type = Reflect.field(value, "@type");
|
||||||
|
if (type == "Dynamic") {
|
||||||
|
//ToDo:
|
||||||
|
exprs.push(Context.parse("var " + n + " = cast {}", getPosition(position)));
|
||||||
|
} else {
|
||||||
exprs.push(Context.parse("var " + n + " = new " + type + "()", getPosition(position)));
|
exprs.push(Context.parse("var " + n + " = new " + type + "()", getPosition(position)));
|
||||||
|
}
|
||||||
createElement(value, n);
|
createElement(value, n);
|
||||||
n;
|
n;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package haxework.provider;
|
package haxework.provider;
|
||||||
|
|
||||||
import haxework.net.manage.LoaderManager;
|
|
||||||
import haxework.net.manage.ILoaderManager;
|
|
||||||
import haxe.ds.ObjectMap;
|
import haxe.ds.ObjectMap;
|
||||||
|
|
||||||
class Provider {
|
class Provider {
|
||||||
|
|
||||||
//private static var factories:ObjectMap<Dynamic, Class<Dynamic>> = new ObjectMap<Dynamic, Class<Dynamic>>();
|
//private static var factories:ObjectMap<Dynamic, Class<Dynamic>> = new ObjectMap<Dynamic, Class<Dynamic>>();
|
||||||
private static var factories:ObjectMap<Dynamic, Class<Dynamic>> = cast [
|
private static var factories:ObjectMap<Dynamic, Class<Dynamic>> = cast [
|
||||||
ILoaderManager => LoaderManager
|
#if (!neko)
|
||||||
|
haxework.net.manage.LoaderManager => haxework.net.manage.ILoaderManager
|
||||||
|
#end
|
||||||
];
|
];
|
||||||
|
|
||||||
private static var args:ObjectMap<Dynamic, Array<Dynamic>> = new ObjectMap<Dynamic, Array<Dynamic>>();
|
private static var args:ObjectMap<Dynamic, Array<Dynamic>> = new ObjectMap<Dynamic, Array<Dynamic>>();
|
||||||
private static var instances:ObjectMap<Dynamic, Dynamic> = new ObjectMap<Dynamic, Dynamic>();
|
private static var instances:ObjectMap<Dynamic, Dynamic> = new ObjectMap<Dynamic, Dynamic>();
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class TextUtil {
|
|||||||
var _textWidth = textField.width;
|
var _textWidth = textField.width;
|
||||||
#else
|
#else
|
||||||
var _textWidth = textField.textWidth;
|
var _textWidth = textField.textWidth;
|
||||||
var _textHeight = textField.textHeight;// * K_HEIGHT;
|
var _textHeight = textField.textHeight * K_HEIGHT;
|
||||||
#end
|
#end
|
||||||
return new Point(_textWidth, _textHeight);
|
return new Point(_textWidth, _textHeight);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user