Snoowy Posted December 28, 2017 Share Posted December 28, 2017 Hy! I started the login panel. What should I do to adapt to any screen resolution? ( Not * and / ) dxDrawImage ( 1006, 0, 362, 90, 'panel.png') -- A kép kirajzolása Link to comment
DRW Posted December 28, 2017 Share Posted December 28, 2017 In my case I use this --Let's say you want to have a resolution reference: local refx,refy = 1600,900 --So we'll use 1600x900 -- This is the actual resolution: local screenW, screenH = guiGetScreenSize() --It's probably 1920x1080 or whatever, who cares, it'll work dxDrawImage (screenW*(240/refx),screenH*(16/refy),screenW*(1120/refx),screenH*(630/refy),"image.jpg") --[[ We multiply our real screen resolution by a division of a size or position (related to the referenced resolution) with the referenced resolution so when it's multiplied by your resolution it gets adjusted. ]] Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now