For my case i use a "Development resolution" (of 1920x1080 ...) then i use the detected Screen Height and Width and i use two simple short named functions to move (or size) elements
(i know i'm a lazy guy :p)
Then i can easily set fixed screen positions/sizes for my element according to my dev screen size and adapting them automagically to detected screen size on other devices.
Here is an example : (obviously you can do this in other ways as said before)
setVirtualResolution(getDeviceWidth(),getDeviceHeight())
Global DEVSCREENHEIGHT,DEVSCREENWIDTH,ScreenHeight#,ScreenWidth#
DEVSCREENWIDTH=1920
DEVSCREENHEIGHT=1080
if GetDeviceHeight()<GetDeviceWidth()
ScreenHeight#=GetDeviceHeight()
ScreenWidth#=GetDeviceWidth()
else
ScreenHeight#=GetDeviceWidth()
ScreenWidth#=GetDeviceHeight()
endif
// Create a 1/4 screen's sprite and place it to the bottom right (according to screen)
MySprite=CreateSprite(0)
SetSpriteSize(MySprite,W(960),H(540))
SetSpriteColor(MySprite,255,0,255,255)
SetSpritePosition(MySprite,W(960),H(540))
Do
sync()
if GetRawKeyPressed(27)=1 then exit
Loop
function H(Value)
ReturnValue=Round(Value*(ScreenHeight#/DEVSCREENHEIGHT))
endfunction ReturnValue
function W(Value)
ReturnValue=Round(Value*(ScreenWidth#/DEVSCREENWIDTH))
endfunction ReturnValue