HI guys,
As usual I got fed up of the display settings showing up againa and again and decided to create my own GUI settings like this:
[java] AppSettings settings = new AppSettings(true);
settings.setResolution(1024,768);
app.setSettings(settings);
app.setShowSettings(false);[/java]
The display settings dont show up anymore but the problem is
1)The window is centered somewhere to the bottom right instead of the center which never used to happen before
2)The text and images inside the window lokk distorted -They are not clear as they used to be?
What am I missing here?
Maybe you should provide the code relevant to your question ?
You speak about GUI, window, text and images, but there is none of that in the shown extract.
Hi guys,
This seems to be very strange but I observe that whenever I try to override the default app setting dialog by app.setShowSettings(false) the gui is completely distorted and not even centered on my screen correctly. I would like to know if anyone has expirienced a similar problem when trying to not get the display setting to be shown? Could someone please try it out and tell me if it is a bug or not? I have tried it with the monkeyzone project as well as the nifty gui samples.
I set more parameters but that’s basically what I do and it works fine for me. Maybe post a simple test case to see if others have the issue. It may be specific to your system.
@author normenhansen
*/
public class Main extends SimpleApplication {
public static void main(String[] args)
{
AppSettings settings = new AppSettings(true);
settings.setResolution(1024, 768);
Main app = new Main();
app.setSettings(settings);
app.setShowSettings(false);
app.start();
}
@Override
public void simpleInitApp() {
Box b = new Box(Vector3f.ZERO, 1, 1, 1);
Geometry geom = new Geometry(“Box”, b);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat.setColor("Color", ColorRGBA.Blue);
geom.setMaterial(mat);
rootNode.attachChild(geom);
I’ve tried your test case. I actually don’t know what exactly you mean by ‘doesnt center the window’.
On my laptop the application window is not really, but almost centered.
In the end there is no difference whether running your test case or running the application with the settings dialog like this
[java]public static void main(String[] args)
{
Main app = new Main();
app.start();
}[/java]
Do you mean to say that the app setting dialog does not show and the Window does not have to be dragged to see the full view? Beacuse for me
these 2 lines make a hell of a difference
[java]app.setSettings(settings);
app.setShowSettings(false)[/java]
@Saba said:
Do you mean to say that the app setting dialog does not show and the Window does not have to be dragged to see the full view? Beacuse for me
these 2 lines make a hell of a difference
[java]app.setSettings(settings);
app.setShowSettings(false)[/java]
He means that, like the rest of us, this is no problem for him. We can start apps with no settings dialog and the app window appears in the normal place as if we’d had a settings dialog.
Something must be odd about your system or something.
Could you make any guesses regarding what this issue could be? I have a 1920x1080 monitor resolution. Also in the logs when I dont use the dialog I observe this line is missing (it may well be initializing of the dialog itself but I thought I should mention it anyway)
[java]Mar 1, 2013 7:57:02 AM com.jme3.system.JmeDesktopSystem initialize\par
[/java]