ZScript status bars

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


ZScript offers another way to create status bars in a much more flexible but complex way.

To start off, MAPINFO's GameInfo section requires defining of the particular status bar.

GameInfo
{ 
	StatusBarClass = "DoomStatusBar"
}

NOTE: Status bars cannot be replaced in the same context as actors via DECORATE. The last loaded mod with a definition of StatusBarClass will be the one to load. All others will be disregarded.

Next, a class that inherits from BaseStatusBar must be defined, and the necessary virtuals overridden. See the classes below for more information.

Classes

Name Description
BaseStatusBar The base status bar which all status bars must inherit from.
HUDFont Used for setting up fonts for use with the DrawString function in BaseStatusBar.
InventoryBarState Used for showing the inventory items and cycling through them, if they possess INVENTORY.INVBAR.
LinearValueInterpolator Used for interpolating between one value to the next on a linear course.
DynamicValueInterpolator Similar to Linear, but can be used to gradually scale the start and end of the approach to and from its destination.