Page 1 of 1

HUD x,y vs. Screen x,y using viewport

Posted: Sat Feb 19, 2005 1:46 pm
by bardomatic
when using the /viewport command to make a smaller viewport than screen size it throws off the X,Y of the HUD.

example:
Screen mode is 1600x1200 I want a 1024x768 viewport in middle of the screen.

MQ2HUD.ini

Code: Select all

[Elements]
Test=1,0,0,255,255,255,TEST
/viewport 0 0 1024 768
TEST shows up at 0,0

/viewport 100 100 1024 768
TEST shows up at 100,100

/viewport 288 216 1024 768
TEST shows up at 288,288

/viewport 288 700 1024 768
TEST shows up at 288,288

it appears to base the HUD 0,0 at the viewports top left corners X,X (note the Y axis changing does not move HUD) (also note that Macroquest.MouseX and Macroquest.MouseY remain constant with the screen and not viewport)

Unless there is something I am missing I'll probably just mod my mq2hud.ccp to have a viewport offset and calculate the X,Y for hud elements using that.

Posted: Sat Feb 19, 2005 8:59 pm
by Night Hawk
It should do that. Plus, I like that it does :P

It shouldn't be hard to make it the way you want it.

Posted: Sat Feb 19, 2005 11:34 pm
by bardomatic
can you tell me how that is usefull, maybe if the viewported hud's xy matched the top corner of the viewport it would be useful, but it using the Xoffset to set both X and Y seems silly to me