Jump to content

[HELP] guiGetScreenSize()


1LoL1

Recommended Posts

Posted (edited)

Hello, can anyone help me with this?

i have this:

dxDrawImage ( screenWidth*0.940 , screenHeight*0.610, screenHeight*0.1, screenHeight*0.1 

but when i added guiGetScreenSize() not work

dxDrawImage ( screenWidth - 47, screenHeight - 305, screenHeight*0.1, screenHeight*0.1 

Edited by Guest
Posted
local screenWidth, screenHeight = guiGetScreenSize() 
dxDrawImage ( screenWidth - 47, screenHeight - 305, screenWidth*0.1, screenHeight*0.1) 

Posted
local screenWidth, screenHeight = guiGetScreenSize() 
dxDrawImage ( screenWidth - 47, screenHeight - 305, screenWidth*0.1, screenHeight*0.1) 

its added and not work :(

this work normally and when i have 800/600 and screenWidth - 47, screenHeight - 235:

235FFB.png

this not work when i have 800/600 and screenWidth - 47, screenHeight - 305:

305FFBT.png

this not work when i have 1300+ and screenWidth - 47, screenHeight - 305:

1000+.png

Posted

That's obvious really, the calculation is just like that.

Use something like this:

dxDrawImage ( (screenWidth / 800) * 753, (screenHeight / 600) * 295, screenWidth*0.1, screenHeight*0.1) 

Posted
That's obvious really, the calculation is just like that.

Use something like this:

dxDrawImage ( (screenWidth / 800) * 753, (screenHeight / 600) * 295, screenWidth*0.1, screenHeight*0.1) 

Can you wrote here how to calculation?

Posted

not work :(

dxDrawImage ( (screenWidth / 800) * 753, (screenHeight / 600) * 295, screenWidth*0.1, screenHeight*0.1, "images/dayzicons/bandit.png",0,0,0,tocolor(r,g,b)) 

WTSFSGG.png

Posted
Adjust it to your liking? Edit the width and height, fix it on 800x600 and it should look fine for the rest.

but this not work.. screenWidth*0.1, screenHeight*0.1

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