Jump to content

Some help with Relative GUI Stuff


Tony Brand

Recommended Posts

hi, i am editing a gui resource that uses
 

local x, y = guiGetScreenSize()
local xx, yy = x / 1600, y / 900
GUI.window[1] = guiCreateWindow((x - (xx * 829)) / 2, (y - (yy * 589)) / 2, xx * 829, yy * 589, "Panel", false)

for width and height and x & y (it is cause of many players use low resolution)
so my question is how i can get new buttons,laybels,.... x , y , width , height ????

also it is relative x,y,width,height of a new picture that i want to add(got by GUIEditor)
 

GUIEditor.staticimage[1] = guiCreateStaticImage(0.13, 0.09, 0.77, 0.84, "bg.png", true)

GUIEditor.staticimage[2] = guiCreateStaticImage(0.07, 0.06, 0.85, 0.88, "x.png", true, GUIEditor.staticimage[1])

and it is absolute x,y,width,height of a new picture that i want to add(got by GUIEditor)
 

GUIEditor.staticimage[1] = guiCreateStaticImage(178, 69, 1052, 645, "bg.png", false)
GUIEditor.staticimage[2] = guiCreateStaticImage(74, 39, 894, 568, "x.png", false, GUIEditor.staticimage[1])

 

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