Jump to content

getScreenSize help


..:D&G:..

Recommended Posts

Hey, I need some hep on the function getScreenSize. This seems to be a really helpfull function for me, but I need a bit more help.

How do I use this function for this line? :

dxDrawRectangle(52, 220, 329, 351, tocolor(1, 0, 0, 170), true) 

I know I have to do:

local x, y = guiGetScreenSize() 

Now how do I implement the x and y on the position of the rectangle?

Link to comment
local sx, sy = guiGetScreenSize ( ) 
dxDrawRectangle( ( sx / 2 - 52 ), ( sy / 2 - 220 ), 329, 351, tocolor(1, 0, 0, 170), true) 

The position won't be correct now, but you can move it until it fit what you need and see if it worked.

leveraging the topic, how to put rims or contour in DxDrawRectangle?

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