|
wavelength 1.0.0
|
Energy bar of the solo head-up display. More...
#include <ovyjuice.h>


Public Member Functions | |
| OvyJuice () | |
| Construct a hidden, full bar from HUD1 energy.tnm and HUD energy.view. | |
| ~OvyJuice () override=default | |
| Destroy the bar. | |
| void | Show (bool bShow) override |
| Slide the bar in or out. | |
| void | Reset () |
| Empty the bar, hide the warning and the ghost, and settle the display. | |
| void | SetLevel (float fLevel, int nColor) |
| Set the level of the bar, leaving a fading ghost when it drops. | |
| void | SetWarning (bool bWarn) |
| Start or stop the blinking warning. | |
| void | Poll (float fDelta) |
| Advance the slide, the warning, the ghost, and the blink of a low bar. | |
| void | SetHideBar (int nHideBar) |
| Public Member Functions inherited from HideablePanel | |
| HideablePanel (const char *pszAnim, const char *pszDrawable, bool bShown) | |
| Construct a panel and find its animation and drawable. | |
| virtual | ~HideablePanel ()=default |
| Destroy the panel. | |
| virtual void | ShowNow (bool bShow) |
| Show or hide the panel at once. | |
| void | SetObjects (const char *pszAnim, const char *pszDrawable, bool bShown) |
| Find the animation and the drawable of the panel, and show or hide it at once. | |
| void | Poll () |
| Advance the slide by sDeltaTime, and show the drawable while the panel is not hidden. | |
Static Public Attributes | |
| static float | sGhostFadeTime |
| The time the ghost of a dropped level takes to fade, juice_ghost_fade_time. | |
| static float | sWarningBlinkTime |
| The half period of the warning's blink, juice_dying_blink_time. | |
| static LinearInterpolator | sBlinkRate |
| The blinks per unit of time of a low bar against its level, from juice_blink_range and juice_blink_frequency. | |
| static float | sBlinkLeft |
| The part of the current blink of a low bar still to run. | |
| Static Public Attributes inherited from HideablePanel | |
| static constexpr float | kShownFrame = 240.0f |
| The frame of the animation at which the panel is fully shown. | |
| static int | sSnap |
| Whether Show() moves a panel at once rather than sliding it. | |
| static float | sDeltaTime |
| The time Poll() advances every panel by. | |
| static RndAnimatable * | sMaterialAnim |
| The animation of the two-dimensional materials, mat_2d_EE.anim, or null. | |
| static float | sMaterialFrame |
| The frame PoseMaterials() poses sMaterialAnim at. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from HideablePanel | |
| static void | ClearSnap () |
| Clear sSnap. | |
| static void | SetDeltaTime (float fDeltaTime) |
| Set the time the next Poll() of every panel advances by. | |
| static void | Init () |
| Find the animation of the two-dimensional materials and the frame it rests at. | |
| static void | Terminate () |
| Forget the animation of the two-dimensional materials. | |
| static void | PoseMaterials () |
| Pose the animation of the two-dimensional materials at its resting frame. | |
| Protected Attributes inherited from HideablePanel | |
| RampAnimator | mSlide |
Energy bar of the solo head-up display.
The RTTI records the class as deriving from HideablePanel. The object is 0x64 bytes. A drop in energy leaves a ghost of the old level that fades out, the bar blinks faster as it empties, and a warning blinks while the player is about to fail.
| OvyJuice::OvyJuice | ( | ) |
Construct a hidden, full bar from HUD1 energy.tnm and HUD energy.view.
|
overridedefault |
Destroy the bar.
|
overridevirtual |
Slide the bar in or out.
The bar shows only in a solo game outside the victory lap.
| bShow | Whether to show the bar. |
Reimplemented from HideablePanel.
| void OvyJuice::Reset | ( | ) |
Empty the bar, hide the warning and the ghost, and settle the display.
| void OvyJuice::SetLevel | ( | float | fLevel, |
| int | nColor ) |
Set the level of the bar, leaving a fading ghost when it drops.
| fLevel | The level, clamped to 0 through 1. |
| nColor | The colour of the bar, a frame of HUD energy.mnm in steps of 500. |
| void OvyJuice::SetWarning | ( | bool | bWarn | ) |
Start or stop the blinking warning.
| bWarn | Whether the warning shows. |
| void OvyJuice::Poll | ( | float | fDelta | ) |
Advance the slide, the warning, the ghost, and the blink of a low bar.
| fDelta | The time since the last poll. |
|
inline |
| nHideBar | Whether the bar is hidden. Reset() clears it. |
|
static |
The time the ghost of a dropped level takes to fade, juice_ghost_fade_time.
|
static |
The half period of the warning's blink, juice_dying_blink_time.
|
static |
The blinks per unit of time of a low bar against its level, from juice_blink_range and juice_blink_frequency.
A level above the end of the range does not blink.
|
static |
The part of the current blink of a low bar still to run.