|
Post by ncrakl on Feb 18, 2020 18:21:50 GMT
Hey, I'm trying to code a bot and I'm not that aware of how to make it compatible with many devices. I read some guides on this forum and it led me to this code : appUsableSize = getAppUsableScreenSize()
toast("Auto Detected Resolution: " .. appUsableSize:getX() .. "x" .. appUsableSize:getY())
Settings:setScriptDimension(true, 2201)
Settings:setCompareDimension(true, appUsableSize:getX())
Please note that I declare all my regions, locations before I call this little piece of code. I made all the region from my device which has a 2201x1080 resolution (usableScreenSize). I tried to execute the code on a different device (1280x720) and the regions were perfectly scaled on width but ... (The red boxes should fill the entire screen) So I have no idea on why it doesn't scale right on height, maybe someone could help me on that ... EDIT: I succeeded to solve my problem my deleting setScriptDimension and setCompareDimension and adding manual widthFactor and heightFactor I just add these to my Locations and Regions so it scales well even on other ratios. However I don't know if it's a good idea, since the images won't be scaled.
|
|