1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
void lwtGraphic::Font::Init(const string Filename, sf::Font &Fonts, unsigned int Size, const string ttf)
{
if(!Fonts.LoadFromFile(Filename, Size, ttf))
exit (3);
}
void lwtGraphic::Font::Color(sf::String &String, int R, int G, int B)
{
String.SetColor(sf::Color(R, G, B));
}
void lwtGraphic::Font::Size(sf::String &String, float Size)
{
String.SetSize(Size);
}
void lwtGraphic::Font::Position(sf::String &String, float x, float y)
{
String.SetPosition(x, y);
}
void lwtGraphic::Font::Rotation(sf::String &String, float angle)
{
String.Rotate(angle);
}
void lwtGraphic::Font::Text(sf::String &String, const string Text)
{
String.SetText(Text);
}
void lwtGraphic::Font::ttf(sf::String &String, sf::Font &Fonts)
{
String.SetFont(Fonts);
}
void lwtGraphic::Font::SetStyle(sf::String &String, bool bold, bool italic, bool underlined)
{
String.SetStyle(sf::String::Regular);
if(bold==true)
String.SetStyle(sf::String::Bold);
if(italic==true)
String.SetStyle(sf::String::Italic);
if(underlined==true)
String.SetStyle(sf::String::Underlined);
}
void lwtGraphic::Font::Move(sf::String &String, float x, float y)
{
String.Move(x, y);
}
void lwtGraphic::Font::Render(sf::String &String, sf::RenderWindow App)
{
App.Draw(String);
}
|