Native fixes

This commit is contained in:
unknown
2018-10-23 19:22:16 +02:00
parent 9adbb96adc
commit 966744e545
6 changed files with 10 additions and 2 deletions
+1
View File
@@ -4,6 +4,7 @@ build_armorpaint/
build_grid/
build/
khafile.js
korefile.js
Sources/Main.hx
*.pyc
.vscode
+2 -1
View File
@@ -4,7 +4,7 @@ import zui.*;
import zui.Zui.State;
import zui.Canvas;
class App {
class App extends iron.Trait {
public static var uienabled = true;
public static var isDragging = false;
@@ -34,6 +34,7 @@ class App {
}
public function new() {
super();
kha.System.notifyOnDropFiles(function(filePath:String) {
dropPath = StringTools.rtrim(filePath);
+1
View File
@@ -272,6 +272,7 @@ class UINodes extends iron.Trait {
}
if (!show) return;
if (arm.App.realw() == 0 || arm.App.realh() == 0) return;
if (!arm.App.uienabled && ui.inputRegistered) ui.unregisterInput();
if (arm.App.uienabled && !ui.inputRegistered) ui.registerInput();
+3 -1
View File
@@ -541,6 +541,8 @@ class UITrait extends iron.Trait {
cmd += ' --output0 "' + tmp + 'tmp_rad"';
cmd += ' --output0params hdr,rgbe,latlong';
Krom.sysCommand(cmd);
#else
var tmp = "";
#end
// Load irr
@@ -1709,7 +1711,7 @@ void main() {
ui.row([1/2,1/2]);
paintVisible = ui.check(Id.handle({selected: paintVisible}), "Visible Only");
var mirrorHandle = Id.handle({selected: mirrorX});
mirrorX = ui.check(mirrorHandle, "Mirror");
mirrorX = ui.check(mirrorHandle, "Mirror Screen");
if (mirrorHandle.changed) {
UINodes.inst.updateCanvasMap();
UINodes.inst.parsePaintMaterial();
+1
View File
@@ -83,6 +83,7 @@ void main() {
wy = 0;
if (!show) return;
if (arm.App.realw() == 0 || arm.App.realh() == 0) return;
if (UITrait.inst.paintDirty()) hwnd.redraws = 2;
@@ -569,6 +569,8 @@ class RenderPathDeferred {
@:access(iron.RenderPath)
public static function commands() {
if (arm.App.realw() == 0 || arm.App.realh() == 0) return;
// Paint
if (!arm.UITrait.inst.dirty()) {
path.setTarget("");