Jump to content

guiCreateStaticImage


Recommended Posts

I drew an image on my login screen but the image does not work for every resolution.

        local Width,Height = 350,350 
  
        local x, y = guiGetScreenSize() 
    local px, py = 1980, 1080 
    local sx, sy = (x/px), (x/py)    
  
        Image = guiCreateStaticImage( x/2-640, y/2-360, 1980, 1280, "login_bg.png", false) 

Can anybody help me how do I make it work for every resolution?

Link to comment
I drew an image on my login screen but the image does not work for every resolution.
        local Width,Height = 350,350 
  
        local x, y = guiGetScreenSize() 
    local px, py = 1980, 1080 
    local sx, sy = (x/px), (x/py)    
  
        Image = guiCreateStaticImage( x/2-640, y/2-360, 1980, 1280, "login_bg.png", false) 

Can anybody help me how do I make it work for every resolution?

Try this but start in 800x600 resolution.

x, y = guiGetScreenSize() 
rx, ry = (x/800), (y/600) 
image = guiCreateStaticImage(rx*640, ry*360, rx*1980, ry*1280, "login_bg.png",false) 

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