HoverRace
2.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
engine
Display
HudText.h
Go to the documentation of this file.
1
2
// HudText.h
3
//
4
// Copyright (c) 2013-2015 Michael Imamura.
5
//
6
// Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7
// you may not use this file except in compliance with the License.
8
//
9
// A copy of the license should have been attached to the package from which
10
// you have taken this file. If you can not find the license you can not use
11
// this file.
12
//
13
//
14
// The author makes no representations about the suitability of
15
// this software for any purpose. It is provided "as is" "AS IS",
16
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17
// implied.
18
//
19
// See the License for the specific language governing permissions
20
// and limitations under the License.
21
22
#pragma once
23
24
#include "
HudDecor.h
"
25
26
#if defined(_WIN32) && defined(HR_ENGINE_SHARED)
27
# ifdef MR_ENGINE
28
# define MR_DllDeclare __declspec( dllexport )
29
# else
30
# define MR_DllDeclare __declspec( dllimport )
31
# endif
32
#else
33
# define MR_DllDeclare
34
#endif
35
36
namespace
HoverRace
{
37
namespace
Display {
38
class
ActiveText;
39
}
40
}
41
42
namespace
HoverRace
{
43
namespace
Display {
44
49
class
MR_DllDeclare
HudText
:
public
HudDecor
50
{
51
using
SUPER
=
HudDecor
;
52
53
public
:
54
HudText
(
Display
&display,
const
std::string &text);
55
virtual
~HudText
() { }
56
57
protected
:
58
void
OnHudRescaled(
const
Vec2
&hudScale)
override
;
59
60
public
:
61
const
std::string &GetText()
const
;
62
void
SetText(
const
std::string &text);
63
64
protected
:
65
void
Layout()
override
;
66
67
private
:
68
std::shared_ptr<FillBox>
bg
;
69
std::shared_ptr<ActiveText>
textLbl
;
70
};
71
72
}
// namespace Display
73
}
// namespace HoverRace
74
75
#undef MR_DllDeclare
HoverRace::Display::HudText::textLbl
std::shared_ptr< ActiveText > textLbl
Definition:
HudText.h:69
HoverRace::Display::UiViewModel
Base class for UI (2D) components.
Definition:
UiViewModel.h:56
HoverRace::Display::HudText::bg
std::shared_ptr< FillBox > bg
Definition:
HudText.h:68
HudDecor.h
MR_DllDeclare
#define MR_DllDeclare
Definition:
HudText.h:33
HoverRace::Vec2
Definition:
Vec.h:38
HoverRace::Display::Display
Base class for display managers.
Definition:
Display.h:73
HoverRace::Display::HudText
Arbitrary text on the HUD.
Definition:
HudText.h:49
HoverRace::Display::HudDecor
Base view model for elements of the heads-up display.
Definition:
HudDecor.h:58
HoverRace
Definition:
Announcement.h:24
HoverRace::Display::HudText::~HudText
virtual ~HudText()
Definition:
HudText.h:55
1.8.11