Open Kevin-Vink opened 2 years ago
This cannot be reproduces on my Mac. Is it possibly related to #208, which makes it a Windows-only bug. Lets test this again after an update to JavaFX 17.
Anyone running Windows that wants to test this one, would be much appreciated.
Found the place the multiplication happens.
Inside one of the javaFX class GlassViewEventHandler.class
program gets the system scale. Running your windows system on 125% scale cause the 1.25 multiplication.
Changing the scale to 100% in side windows. will 'fix' this.
It looks like you need to work with the Pane object and not with the Scene object of the abstract StaticScene.
Thanks @RyanAelen ! If you have the time, you're welcome to implement a fix. :-)
Using environment variable / java property glass.win.uiScale=100%
works for me! It should tell glass/javafx to use 100% scaling no matter what the option in windows is configured to.
I tried setting the property in code (using System.setProperty()) in the YaegerGame class but this had no effect. I also tried prism.allowhidpi=false
without effect. Maybe add the environment variable hint to the docs somewhere?
Interesting, I didn't know about this setting. I'll try to figure out how to set this property from code. It should be possible... I guess.
The post in the link seems to state an example that solves the problem. Main thing seems to set the property before calling the run-method. Could you (@Jaapapa ) perhaps test this on windows?
https://stackoverflow.com/questions/67264613/system-setpropertyprism-allowhidpi-false-does-not-work
I couldnt get it to work. Tried all the props and also creating a seperate launcher class like so:
public static void main(String[] args) {
System.setProperty("glass.win.uiScale","100%"); // :(
// System.setProperty("prism.lcdtext", "false"); // :(
// System.setProperty("prism.subpixeltext", "false"); // :(
// System.setProperty("prism.allowhidpi", "false"); // :(
JGame.launch(args);
}
}
I'll leave this issue as is for now. Maybe someone will find a solution for this in the future.
When parsing the scene to a DynamicCompositeEntity the width and height change to a value multiplied by 1.25.
The initial size of the game:
the size im getting in the DynamicCompositeEntity