Jump to content

[ dxDrawText ] ?


SoMoRay

Recommended Posts

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

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