Jump to content

Help - x,y - DX


xXMADEXx

Recommended Posts

Posted

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 

Posted

Use the guieditor resource to get the dxDraw positions, output the code and replace the positions with your existing script.

And now Aurora is back again, pm for more info.

Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA.

Ex. Developer at Community of Social Gamers - CSG

Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP

9o6E8.png Ab-47

Posted

He wants to put the text in the same position in different resolutions, not find absolute positions.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

  • 2 weeks later...
Posted
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 

And now Aurora is back again, pm for more info.

Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA.

Ex. Developer at Community of Social Gamers - CSG

Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP

9o6E8.png Ab-47

Posted

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.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted
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:

And now Aurora is back again, pm for more info.

Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA.

Ex. Developer at Community of Social Gamers - CSG

Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP

9o6E8.png Ab-47

Posted
guiGetScreenSize() -- Look at "Using guiGetScreenSize to fit GUI & DX drawing in all resolutions" 

Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS.

Developer and owner of

https://projectbea.st - Project Beast

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