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

Forum for posting custom UIs, portions of UIs, and HUD stuff using MQ's enhancements.

Moderator: MacroQuest Developers

bardomatic
a ghoul
a ghoul
Posts: 131
Joined: Thu Apr 29, 2004 12:09 am

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

Post by bardomatic » 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

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.

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Sat Feb 19, 2005 8:59 pm

It should do that. Plus, I like that it does :P

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

bardomatic
a ghoul
a ghoul
Posts: 131
Joined: Thu Apr 29, 2004 12:09 am

Post by bardomatic » Sat Feb 19, 2005 11:34 pm

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