Quote from
luishp on March 16, 2022, 2:32 pm
@bca07313 the mouse position will be allways related to the screen resolution. If you use slScaleAppFit your app will have a different scale than the screen and you will have to transform the mouse coordinates accordingly. The number to multiply to depends on your original app size and the target screen resolution size.
If you use the more modern command FitAppToScreen you will get the scale automaticaly in the global variable [NAB.AppScale]
Sample code to fit your app to the screen size:
FitAppToScreen false "middle" "center"
After this command has been executed [NAB.AppScale] will store the scale factor applied to your application.
I hope it helps.
Regards.
@bca07313 the mouse position will be allways related to the screen resolution. If you use slScaleAppFit your app will have a different scale than the screen and you will have to transform the mouse coordinates accordingly. The number to multiply to depends on your original app size and the target screen resolution size.
If you use the more modern command FitAppToScreen you will get the scale automaticaly in the global variable [NAB.AppScale]
Sample code to fit your app to the screen size:
FitAppToScreen false "middle" "center"
After this command has been executed [NAB.AppScale] will store the scale factor applied to your application.
I hope it helps.
Regards.
bca07313 and javadrajabihakami have reacted to this post.
bca07313javadrajabihakami