Etterna
0.74.4
Loading...
Searching...
No Matches
src
Etterna
Actor
Menus
MenuTimer.h
1
/* MenuTimer - A timer on the menu that ticks down. */
2
3
#ifndef MENU_TIMER_H
4
#define MENU_TIMER_H
5
6
#include "Etterna/Actor/Base/ActorFrame.h"
7
#include "Etterna/Actor/Base/AutoActor.h"
8
#include "Etterna/Actor/Base/BitmapText.h"
9
#include "RageUtil/Sound/RageSound.h"
10
#include "Etterna/Models/Misc/ThemeMetric.h"
11
12
std::string
13
WARNING_COMMAND_NAME(
size_t
i);
14
15
class
MenuTimer
:
public
ActorFrame
16
{
17
public
:
18
MenuTimer
();
19
~MenuTimer
()
override
;
20
void
Load(
const
std::string& sMetricsGroup);
21
22
void
Update(
float
fDeltaTime)
override
;
23
24
void
SetSeconds(
float
fSeconds);
25
float
GetSeconds()
const
{
return
m_fSecondsLeft; }
26
void
Start();
// resume countdown from paused
27
void
Pause();
// don't count down
28
void
Stop();
// set to "00" and pause
29
void
Disable();
// set to "99" and pause
30
void
Stall();
// pause countdown for a sec
31
void
EnableSilent(
bool
bSilent)
32
{
33
m_bSilent = bSilent;
34
}
// make timer silent
35
void
EnableStealth(
bool
bStealth);
// make timer invisible and silent
36
37
// Lua
38
void
PushSelf(lua_State* L)
override
;
39
40
protected
:
41
float
m_fSecondsLeft = 0.f;
42
float
m_fStallSeconds, m_fStallSecondsLeft;
43
bool
m_bPaused;
44
45
void
SetText(
float
fSeconds);
46
47
#define NUM_MENU_TIMER_TEXTS 2
48
49
bool
m_bSilent;
50
51
BitmapText
m_text[NUM_MENU_TIMER_TEXTS];
52
53
LuaReference
m_exprFormatText[NUM_MENU_TIMER_TEXTS];
54
55
AutoActor
m_sprFrame;
56
57
RageSound
m_soundBeep;
58
59
ThemeMetric<int>
WARNING_START;
60
ThemeMetric<int>
WARNING_BEEP_START;
61
ThemeMetric<float>
MAX_STALL_SECONDS;
62
ThemeMetric<float>
HURRY_UP_TRANSITION;
63
ThemeMetric1D<apActorCommands>
* WARNING_COMMAND;
64
};
65
66
#endif
ActorFrame
A container for other Actors.
Definition
ActorFrame.h:8
AutoActor
A smart pointer for Actor.
Definition
AutoActor.h:13
BitmapText
An actor that holds a Font and draws text to the screen.
Definition
BitmapText.h:11
LuaReference
A self-cleaning Lua reference.
Definition
LuaReference.h:10
MenuTimer
Definition
MenuTimer.h:16
RageSound
Definition
RageSound.h:130
ThemeMetric1D
Definition
ThemeMetric.h:192
ThemeMetric
The theme specific data.
Definition
ThemeMetric.h:52
Generated by
1.9.8