BaseStatusBar image function arguments

From ZDoom Wiki
Jump to navigation Jump to search
  • int flags
The DI_SCREEN* flags will change the origin point of the coordinates where the element is drawn (essentially, moving where the (0, 0) point is located.
  • DI_SCREEN_TOP - The coordinates begin at the top center of the screen
  • DI_SCREEN_BOTTOM - The coordinates begin at the bottom center of the screen
  • DI_SCREEN_LEFT_CENTER - The coordinates begin at the center left side of the screen
  • DI_SCREEN_RIGHT_CENTER - The coordinates begin at the center right side of the screen
  • DI_SCREEN_LEFT_TOP - The coordinates begin at the top left corner of the screen
  • DI_SCREEN_RIGHT_TOP - The coordinates begin at the top right corner of the screen
  • DI_SCREEN_LEFT_BOTTOM - The coordinates begin at the bottom left corner of the screen
  • DI_SCREEN_RIGHT_BOTTOM - The coordinates begin at the bottom right corner of the screen
  • DI_SCREEN_CENTER - The coordinates begin at the center of the screen
  • DI_SCREEN_CENTER_BOTTOM - The coordinates begin at the bottom center of the screen
Note, these flags do not change the orientation of coordinates. Regardless of where the element is drawn, positive X moves it to the right, positive Y moves it down.
More flags are defined in the StatusBarCore class, but they're mostly aliases of the above ones.
The DI_ITEM* flags determine the anchor point of the HUD element, i.e. how it is placed relative to the specified position. By default elements are drawn from their top left corner. The following flags determine the anchor point:
  • DI_ITEM_TOP - top. Combine with DI_ITEM_CENTER to anchor at the top center.
  • DI_ITEM_BOTTOM - bottom. Combine with DI_ITEM_CENTER to anchor at the bottom center.
  • DI_ITEM_LEFT - left side. Combine with DI_ITEM_CENTER to anchor at the center of the left side.
  • DI_ITEM_RIGHT - right side. Combine with DI_ITEM_CENTER to anchor at the center of the right side.
  • DI_ITEM_LEFT_TOP - top left corner (same as DI_ITEM_TOP|DI_ITEM_LEFT)
  • DI_ITEM_RIGHT_TOP - top right corner (same as DI_ITEM_TOP|DI_ITEM_RIGHT)
  • DI_ITEM_LEFT_BOTTOM - bottom left corner (same as DI_ITEM_BOTTOM|DI_ITEM_LEFT)
  • DI_ITEM_RIGHT_BOTTOM - bottom right corner (same as DI_ITEM_BOTTOM|DI_ITEM_RIGHT)
  • DI_ITEM_CENTER - center point
  • DI_ITEM_OFFSETS - The element's built-in offsets (as set in SLADE) are taken into account.
Note, these flags do not change the orientation of coordinates. Regardless of the element's anchor point, positive X moves it to the right, positive Y moves it down.
More flags are defined in the StatusBarCore class), but they're mostly aliases of the above ones.
  • double alpha
Determines the translucency of the image in the 0.0-1.0 range.
  • vector2 box
Determines the size of the box the image will be drawn in. If the size is smaller than the image, the image will be scaled to the size. The default value of (-1, -1) doesn't apply any box.
  • vector2 scale
Determines the scale of the image.
  • ERenderStyle style
The renderstyle of the image. Uses the same values as the RenderStyle property. The default value is STYLE_Translucent.
  • color col
Allows tinting the image to a specific color. The default value is FFFFFF (white), which applies no tint. The darker the color, the more visible the tint will be.
  • int translation
Allows applying a translation to the image. The translation can be picked from an actor pointer with <actorpointer>.translation, or with Translation.GetID('MyTranslationName') where 'MyTranslationName' is a definition from the TRNSLATE lump.
  • double clipwidth
Allows specifying a distance in pixels beyond which the image will be clipped horizontally. (Verification needed)