Jump to content

Help dxDraw


Recommended Posts

You'll have to make use of dxDrawRectangle or dxDrawImage to draw an image as an window and also the function guiGetScreenSize.

Here is an example of an override of dxDrawRectangle to be ajusted automatically for every resolution:

local screenWidth = 800; 
local screenHeight = 600; 
local iScreenW, iScreenH = guiGetScreenSize ( ); 
__dxDrawRectangle = dxDrawRectangle; 
function dxDrawRectangle ( ... ) 
    local arg = { ... } 
    return __dxDrawRectangle ( ( arg[1] / screenWidth ) * iScreenW, ( arg[2] / screenHeight ) * iScreenH, ( arg[3] / screenWidth ) * iScreenW, ( arg[4] / screenHeight ) * iScreenH, arg[5] or nil, arg[6] or nil ); 

Note: Change 'screenWidth' and 'screenHeight' variables to the screen size where you got screen positions.

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