08-03-2012, 01:28
Hello,
i have a problem with the postioning of HudElem objects.
When i wan't to set a HudElem (in this case: HUD_Text) for example on the right of another HudElem (in this case: HUD_Icon) it doesn't seem to calculate correct since the HUD_Text is inside the HUD_Icon instead of at the right.
Also the position of Hud Elements alter on Clients too.
My Calculation of the X-Position for HUD_Text is:
I think the problem lies in different client-sided screen resolutions.
So is it possible 1. to get the real coordinates/sizes of HudElem objects from a certain client or 2. to get screen values from a client?
If not @zxz0O0 could you implement that?
Example on Usage (Solution 1):
Example on Usage (Solution 2):
Or is there a other way to get the right Position for every clients? Maybe i just missed something
i have a problem with the postioning of HudElem objects.
When i wan't to set a HudElem (in this case: HUD_Text) for example on the right of another HudElem (in this case: HUD_Icon) it doesn't seem to calculate correct since the HUD_Text is inside the HUD_Icon instead of at the right.
Also the position of Hud Elements alter on Clients too.
My Calculation of the X-Position for HUD_Text is:
CSHARP Code
- HUD_Text.OriginX = HUD_Icon.OriginX + HUD_Icon.IconWidth
I think the problem lies in different client-sided screen resolutions.
So is it possible 1. to get the real coordinates/sizes of HudElem objects from a certain client or 2. to get screen values from a client?
If not @zxz0O0 could you implement that?
Example on Usage (Solution 1):
CSHARP Code
- HUD_Icon.SetPosition(10, 100, client.ClientNum) //10 = x, 100 = y, ClientNum for screen calculation
Example on Usage (Solution 2):
CSHARP Code
- HUD_Icon.OriginX = client.ScreenRectangle.Right - HUD_Icon.IconWidth
Or is there a other way to get the right Position for every clients? Maybe i just missed something