..:D&G:.. Posted March 15, 2014 Share Posted March 15, 2014 Hello, I want to know whats the easiest way to use the getScreenSize on a dxDrawn image. I know many people use it, and I don't think they spend like 2 days on finding the position on a small image Link to comment
Bonsai Posted March 15, 2014 Share Posted March 15, 2014 x,y, = guiGetScreenSize() x*0.1 = 10% y*0.2 = 20% of screen, on any resolution. Link to comment
Driggero Posted March 15, 2014 Share Posted March 15, 2014 guiGetScreenSize() gives you the size of your screens resolution. So if for example it was 1024x768, You'd know that 500 lengthways is about center. Same goes for widthways, ~370 would be close to center there. I usually use that when I'm trying to estimate where to place an image on screen. I highly recommend NOT using single values like that though (such as 500 or 370) as what is in the center on one resolution will not be on another. Instead I'd do something like this: local x, y = guiGetScreenSize() local middleX, middleY = x/2, y/2 That way it will scale to all resolutions. This is just an example of centering images, but you get the idea Link to comment
..:D&G:.. Posted March 30, 2014 Author Share Posted March 30, 2014 Thanks for the tip. Isn´t there a method where you can do it easier? It takes way tooo much to calibrate even 1 small button, and I hardly find the right position. Link to comment
.:HyPeX:. Posted March 30, 2014 Share Posted March 30, 2014 You can basically take adventage of "getCursorPosition" to do it. 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