Jump to content

dx resolution problem


Krons

Recommended Posts

Hello, I made a script in dx that is something like a square, the problem is that i made it on my resolution(1280x1024) where looks fine, but on other resolution will not be a square anymore. What I want is the dx to look like a square on all resolutions.

local x, y = guiGetScreenSize()

dxDrawImage(x * 0.2891, y * 0.2891, x * 0.4227, y * 0.4229, ":electric/circuitBoard.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)

This is how it looks for my resolution: UsdTXTM.jpg

and this is how it looks on other resolution:

 ym2ocy2.png

Link to comment
local sw, sh = guiGetScreenSize()
local x, y = sw/1280, sh/1024

dxDrawImage(x * 0.2891, y * 0.2891, x * 0.4227, y * 0.4229, ":electric/circuitBoard.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)

 

Edited by Dimos7
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...