Dim

From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.


Screen

native static void Dim(Color col, double amount, int x, int y, int w, int h, ERenderStyle style = STYLE_Translucent)

Usage

Used to blend the screen in the specified bounding box to a color. If using a palette color is desired then Clear should be used instead. Coordinates are absolute and start from the top left of the screen with positive x values shifting to the right and positive y values shifting downward.

Warning: This can only be called from within functions that are specifically designed to draw HUD elements (e.g. BaseStatusBar's Draw or EventHandler's RenderOverlay).

Parameters

  • col - The color to fill the area of the box with
  • amount - The alpha value of the color. A value of 1 is fully opaque while a value of 0 is fully transparent
  • x - The x offset of the box
  • y - The y offset of the box
  • w - The width of the box
  • h - The height of the box
  • style - The type of style to apply to the blend. Defaults to STYLE_Translucent

Examples

Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.