Open anissen opened 3 years ago
Huh, thats interesting - do you have full test app to play with? (just we are on the exact same page)
Sure, I'll make a minimal project that reproduces this issue!
Here's a minimal project setup to reproduce this issue:
Main.hx
package;
import kha.Assets;
import kha.Framebuffer;
import kha.System;
class Main {
public static function main() {
System.start({title: "HaxeUI issue", width: 800, height: 600}, function (_) {
Assets.loadEverything(function () {
haxe.ui.Toolkit.theme = "kenney";
haxe.ui.Toolkit.init({ showFPS: true });
final screen = haxe.ui.core.Screen.instance;
final ui = haxe.ui.macros.ComponentMacros.buildComponent("ui.xml");
screen.addComponent(ui);
function render(frames: Array<Framebuffer>) {
var g2 = frames[0].g2;
g2.begin(true, kha.Color.White);
g2.color = kha.Color.Yellow;
screen.renderTo(g2);
g2.end();
}
System.notifyOnFrames(function (frames) { render(frames); });
});
});
}
}
ui.xml
<vbox width="100%" height="500">
<frame text="Code" width="100%" height="100%">
<vbox width="100%" height="100%">
<textarea id="script" width="100%" height="100%" text="I am a text area 1" style="font-size: 16px; font-name: 'BrassMono';" />
<button width="100%" text="Reload" />
</vbox>
</frame>
</vbox>
And here's the zipped files (with Kha/ and libs/{haxeui-theme-kenney,haxeui-kha,haxeui-core}/):
By the way, I'm using...
OK, that should be fixed now in latest haxeui-kha (git version).
If thats working can you close this?
Cheers, Ian
Changing the color of the
kha.graphics2.Graphics
-object affects the colors in this theme.For instance:
And: