SoMoRay Posted May 17, 2013 Share Posted May 17, 2013 hi is there any code center dxDrawText ? Link to comment
denny199 Posted May 17, 2013 Share Posted May 17, 2013 You can calculate it easy. Go to my post> viewtopic.php?f=91&t=57776 Like: --converted a bit for dxDrawing. -- since there isn't a 'element' for dxDrawing you need to remove the function and se the 'x' and the 'y' local screenW,screenH=guiGetScreenSize() --it's stil the same. local windowW,windowH=500,500 --see down why. -- You need to put here your variables ( like the width and height ) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 -- this will center the rectangle preciese like the default function --and then you can use this: addEventHandler("onClientRender", root, function () dxDrawRectangle ( x, y, 500, 500, tocolor ( 0, 0, 0, 150 ) ) -- for example a rectangle. end) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now