BaseStatusBar position argument

From ZDoom Wiki
Jump to navigation Jump to search
  • vector2 pos
The position of the element on the screen relative to the HUD's virtual resolution. Positive X moves it to the right, positive Y moves it down. By default, like with all other BaseStatusBar elements, (0, 0) equals to top left corner of the HUD area.
If you're making a fullscreen HUD, unless it's forcescaled (the forcescaled argument of the BeginHUD call is set to true), pos should never be used globally. Instead, DI_SCREEN* and DI_ITEM* flags (see below) should be used to move the anchor point of the image and the origin point of the coordinates, so that it's drawn relative to screen corners and/or sides. This is the only way to make sure that the image doesn't end up being misplaced at different screen resolutions and aspect ratios.