Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F145180
grouphud.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
grouphud.cpp
View Options
#include
"grouphud.h"
#include
"data.h"
namespace
efc
{
GroupHud
::
GroupHud
(
sf
::
Font
*
gameFont
)
{
seasonName
.
setFont
(
*
gameFont
);
}
GroupHud
::
GroupHud
(){
}
void
GroupHud
::
setFont
(
sf
::
Font
*
gameFont
)
{
seasonName
.
setFont
(
*
gameFont
);
roundName
.
setFont
(
*
gameFont
);
monthName
.
setFont
(
*
gameFont
);
seasonName
.
setColor
(
sf
::
Color
(
255
,
255
,
255
));
seasonName
.
setCharacterSize
(
30
);
roundName
.
setCharacterSize
(
30
);
monthName
.
setCharacterSize
(
30
);
roundName
.
setColor
(
sf
::
Color
(
255
,
255
,
250
));
// monthName.move(400, 0);
setMonthName
(
1
);
}
void
GroupHud
::
setSeason
(
int
seasonNumber
){
seasonName
.
setString
(
"Season: "
+
efc
::
seasonsNames
[
seasonNumber
]);
setPosition
(
440
,
12
);
}
void
GroupHud
::
setDeerModeActive
(){
seasonName
.
setString
(
"Deer Mode"
);
setPosition
(
455
,
12
);
}
void
GroupHud
::
setRoundName
(
int
roundNumber
){
roundName
.
setString
(
"Round: "
+
std
::
to_string
(
roundNumber
));
roundName
.
setPosition
(
30
,
700
);
}
void
GroupHud
::
setDeerModeCounter
(
int
deerModeCounter
)
{
roundName
.
setString
(
std
::
to_string
(
deerModeCounter
));
roundName
.
setPosition
(
50
,
700
);
}
//void
void
GroupHud
::
setMonthName
(
int
monthNumber
){
monthName
.
setString
(
"Month: "
+
std
::
to_string
(
monthNumber
));
}
void
GroupHud
::
draw
(
sf
::
RenderTarget
&
target
,
sf
::
RenderStates
states
)
const
{
states
.
transform
*=
getTransform
();
target
.
draw
(
seasonName
,
states
);
target
.
draw
(
roundName
,
states
);
// target.draw(monthName, states);
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Aug 16, 3:21 AM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
77358
Default Alt Text
grouphud.cpp (1 KB)
Attached To
Mode
R82 deerportal
Attached
Detach File
Event Timeline