Hello all, I'm running Windows Vista and it seems I need to apply the following local translation to the desktop of JMEDesktopState in order to let (0,0) be at the top-left corner:
desktopState.getDesktop().getLocalTranslation().set(80, -60, 0);
Is this a bug, a Vista problem or something that needs to be done on some platforms (such as Vista)? If so, is there a platform independent way I could detect and set these values? I'm guessing it's some quirky behaviour though. Edit: see message below code too.
Full code:
final JMEDesktopState desktopState = new JMEDesktopState();
GameStateManager.getInstance().attachChild(desktopState);
desktopState.setActive(true);
GameTaskQueueManager.getManager().update(new Callable<Object>() {
public Object call() throws Exception {
JButton button = new JButton("test");
button.setSize(100, 100);
button.setLocation(0, 0);
desktopState.getDesktop().getJDesktop().add(button);
desktopState.getDesktop().getLocalTranslation().set(80, -60, 0); // ?
return null;
}
});
Edit: the following may or may not be related but it also occurs elsewhere in the game. For example, the "mouse sensitive border" (to navigate the map with the mouse) at the edge of the screen is smaller at the top and left side of the window. So perhaps it's a setting elsewhere. The bottom left corner is (16,-16,0) when I check the coordinates of the absolute mouse.