Jump to content

Help - x,y - DX


xXMADEXx

Recommended Posts

Hey guys, im making a DX panel work for all resolutions, but i cannot get the dx text to create in the correct position...

xDrawBorderedDescText("Username:",(resX/2) - (609/2) + 130, (resX/2) - (400/2) - 40, 609, 422, tocolor(255, 255, 255, 255), 2, "default", "left", "top", false, false, true, false, false) -- Username Text 
    dxDrawBorderedDescText("Password: ", (resX/2) - (609/2) + 130, (resX/2) - (400/2) + 20, 609, 475, tocolor(255, 255, 255, 255), 2, "default", "left", "top", false, false, true, false, false) -- Password Text 
    dxDrawBorderedDescText("Login/Register Panel", X, 350, resX - 300, 380, tocolor(255, 255, 255, 255), 3, "default", "center", "center", false, false, true, false, false)-- Label 

Link to comment
  • 2 weeks later...
He wants to put the text in the same position in different resolutions, not find absolute positions.

I can make it center the window in all resolutions:

centerTheWindow(theGUI) 
--Within the function of the GUI 
  
function centerTheWindow(centerWindow) 
    local screenW,screenH=guiGetScreenSize() 
    local windowW,windowH=guiGetSize(centerWindow,false) 
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2 
    guiSetPosition(centerWindow,x,y,false) 
end 

Link to comment
If you look at his code, you can see that he doesn't want to put it in the center. Also, that function only works with GUI elements.

Oh lol sorry, didn't take a look at the thread whilst posting and mistaken this for another topic. Sorry :roll:

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