HUD x,y vs. Screen x,y using viewport
Posted: Sat Feb 19, 2005 1:46 pm
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
/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.
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,TESTTEST 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.