-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kha color "leaks" into theme #3
Comments
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, |
Changing the color of the
kha.graphics2.Graphics
-object affects the colors in this theme.For instance:
And:
The text was updated successfully, but these errors were encountered: