Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/haxeui/haxeui-nme
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Jan 17, 2018
2 parents d7c5245 + e07cebb commit a67234c
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ os:
- linux

haxe:
- "3.4.2"
- "3.4.4"
- development

before_install:
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Change Log
---------
* 0.0.2
* Enhanced text input / display
* 0.0.1 - Initial Release
29 changes: 29 additions & 0 deletions TravisBuild.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import haxe.io.Path;
import haxe.macro.Compiler;
import sys.io.Process;

using StringTools;

class TravisBuild {
public static function addNmeClasspaths () {
var proc = new Process("haxelib", ["path", "nme"]);
proc.exitCode();
var path = proc.stdout.readAll().toString().split("\n");
proc.close();

var cp = "";
for (p in path) {
if (p.startsWith("-L ") || p.startsWith("-D ") || p == "") {
continue;
}
cp = p;
break;
}

Compiler.addClassPath(Path.join([cp, "src"]));

if (Compiler.getDefine("NME_NO_HAXE_COMPAT") == null) {
Compiler.addClassPath(Path.join([cp, "src/haxe/compat"]));
}
}
}
2 changes: 1 addition & 1 deletion haxe/ui/backend/ImageDisplayBase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class ImageDisplayBase {
if(_imageClipRect == null) {
sprite.scrollRect = null;
} else {
sprite.scrollRect = new openfl.geom.Rectangle(-_left, -_top, Math.fround(_imageClipRect.width), Math.fround(_imageClipRect.height));
sprite.scrollRect = new flash.geom.Rectangle(-_left, -_top, Math.fround(_imageClipRect.width), Math.fround(_imageClipRect.height));
sprite.x = _imageClipRect.left;
sprite.y = _imageClipRect.top;
}
Expand Down
2 changes: 1 addition & 1 deletion haxe/ui/backend/ScreenBase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ScreenBase {
Lib.current.stage.addEventListener(nme.events.Event.RESIZE, onStageResize);
}

public var options(default, default):Dynamic;
public var options(default, default):ToolkitOptions;

public var width(get, null):Float;
public function get_width():Float {
Expand Down
4 changes: 4 additions & 0 deletions haxe/ui/backend/ToolkitOptions.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package haxe.ui.backend;

typedef ToolkitOptions = {
}
1 change: 1 addition & 0 deletions linux.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@

-cp .
#--no-output
--macro TravisBuild.addNmeClasspaths()
--macro haxe.macro.Compiler.include("haxe.ui")
1 change: 1 addition & 0 deletions windows.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@

-cp .
#--no-output
--macro TravisBuild.addNmeClasspaths()
--macro haxe.macro.Compiler.include("haxe.ui")

0 comments on commit a67234c

Please sign in to comment.