Adds "DI_MIRROR" flag to statusbar image drawing. Useful for rearview mirror camera textures, for example.

This commit is contained in:
Marisa Kirisame 2018-03-22 13:22:39 +01:00 committed by Christoph Oelckers
parent 7301001a3f
commit 634a10db52
3 changed files with 3 additions and 0 deletions

View File

@ -517,6 +517,7 @@ enum DI_Flags
DI_ALWAYSSHOWCOUNT = 0x200, // only for DrawInventoryBar.
DI_DIMDEPLETED = 0x400,
DI_DONTANIMATE = 0x800, // do not animate the texture
DI_MIRROR = 0x1000, // flip the texture horizontally, like a mirror
DI_SCREEN_AUTO = 0, // decide based on given offsets.
DI_SCREEN_MANUAL_ALIGN = 0x4000, // If this is on, the following flags will have an effect

View File

@ -1635,6 +1635,7 @@ void DBaseStatusBar::DrawGraphic(FTextureID texture, double x, double y, int fla
DTA_Alpha, Alpha,
DTA_AlphaChannel, !!(flags & DI_ALPHAMAPPED),
DTA_FillColor, (flags & DI_ALPHAMAPPED) ? 0 : -1,
DTA_FlipX, !!(flags & DI_MIRROR),
TAG_DONE);
}

View File

@ -171,6 +171,7 @@ class BaseStatusBar native ui
DI_ALWAYSSHOWCOUNT = 0x200, // only for DrawInventoryBar.
DI_DIMDEPLETED = 0x400,
DI_DONTANIMATE = 0x800, // do not animate the texture
DI_MIRROR = 0x1000, // flip the texture horizontally, like a mirror
DI_SCREEN_AUTO = 0, // decide based on given offsets.
DI_SCREEN_MANUAL_ALIGN = 0x4000, // If this is on, the following flags will have an effect