Jump to content

DxDraw compatibility all Screen Resolution


Snoowy

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...