Incorrect ZApplication.MousePosition in Preview
Posted: Sat Oct 25, 2014 10:25 am
In the latest Beta, if an application has set ViewportRatio to the value other than "Full window", e.g. 16:9, and it is running in the ZGE Preview panel, the ZApplication.MousePosition is not set correctly. The offset of the returned position depends also on the size of the Preview panel.
See the attached testing project: run it in a Preview which is wider than taller and has some black side strips. Put the mouse to the middle of the screen marked with small yellow point. The white rectangle, determining the mouse position should also be in the middle, but it is not. Change the Preview size and observe that the position offset changes. Try to run it with F9 and see that it is correct.
(Fix is quite urgent since I cannot continue with planned game development.)
See the attached testing project: run it in a Preview which is wider than taller and has some black side strips. Put the mouse to the middle of the screen marked with small yellow point. The white rectangle, determining the mouse position should also be in the middle, but it is not. Change the Preview size and observe that the position offset changes. Try to run it with F9 and see that it is correct.
(Fix is quite urgent since I cannot continue with planned game development.)