..:D&G:.. Posted January 12, 2014 Posted January 12, 2014 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?
..:D&G:.. Posted January 12, 2014 Author Posted January 12, 2014 I want to make that rectable to it doesn't look big when people have small resolutions. So it changes shape acording to the resolution of the player.
Castillo Posted January 12, 2014 Posted January 12, 2014 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.
Gallagher Posted January 12, 2014 Posted January 12, 2014 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?
..:D&G:.. Posted January 12, 2014 Author Posted January 12, 2014 local sx, sy = guiGetScreenSize ( ) dxDrawRectangle( ( sx / 2 - 52 ), ( sy / 2 - 220 ), 329, 351, tocolor(1, 0, 0, 170), true) Question, why have u put 2 - in there? I know why the - is there, but why 2?
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