Jump to content

Pciture- All resolution the same


Eistee

Recommended Posts

Posted

hello, ich have created a image in "absolut"

picture = guiCreateStaticImage(317, 171, 835, 117, "picture .png", false)

How i set the picture so, that the picture is on the same place in all resolutions?

Posted

Divide each of the picture's position values by the screen size manually.

And put it multiplied by the your screen width and height.

local swidth, sheight = guiGetScreenSize() 
  
local X = 317/yourScreenWidth = value 
local Y = 171/yourScreenHeight = value 
local width = 835/yourScreenWidth = value 
local height = 117/yourScreenHeight = value 
  
picture = guiCreateStaticImage(swidth*valueX, sheight*valueY, swidth*valueWidth, sheight*valueHeight, "picture .png", false) 

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...