@Paul
Quote: "Can you create small example that demonstrates the problem? The example I used to test the fix worked fine."
In my game this function is used:
SetViewOffset
to move certain Sprites of the game ... and others fixed FixSpriteToScreen.
With the text elements I also fix them FixTextToScreen
Everything is OK.
It turns out that if SetViewOffset and Virtual buttons are used, they are affected ... it is a BUG introduced this latest update!
that is to say: SetViewOffset will move the coordinates of the Virtual buttons (the graphic change is not visible), but if the active button coordinates with SetViewOffset
using SetViewOffset should not affect the coordinates of active virtual buttons.
The virtual buttons only work well if I set SetViewOffset (0,0), the problem is that I don't want the Sprite content to move
// Project: test-VirtualButton
// Created: 2019-11-05
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "test-VirtualButton" )
SetWindowSize( 853, 480, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 853, 480 ) // doesn't have to match the window
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
rcentro=853/2
Y=230
AddVirtualButton(2,rcentro,y,0):SetVirtualButtonSize(2,420,40)
INC Y,50
AddVirtualButton(3,rcentro,Y,0):SetVirtualButtonSize(3,300,40)
INC Y,50
AddVirtualButton(4,rcentro,Y,0):SetVirtualButtonSize(4,300,40)
INC Y,50
AddVirtualButton(5,rcentro,Y,0):SetVirtualButtonSize(5,300,40)
//SetViewOffset(0,0) //normal function for VirtualButton
SetViewOffset(50,50) //bug for VirtualButton
do
bot2=GetVirtualButtonState(2)
bot3=GetVirtualButtonState(3)
bot5=GetVirtualButtonState(5)
bot4=GetVirtualButtonState(4)
print(bot2)
print(bot3)
print(bot4)
print(bot5)
Sync()
loop