-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.cpp
55 lines (42 loc) · 1.18 KB
/
Settings.cpp
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
48
49
50
51
52
53
54
55
//
// Settings.cpp
// battleeee
//
// Created by Ingy on 1/13/15.
// Copyright (c) 2015 Ingy. All rights reserved.
//
#include "Settings.h"
#include "ResourcePath.hpp"
Settings::Settings ()
{
language="English";
fontPathE = resourcePath() + "font1.ttf";
overallFont.loadFromFile(fontPathE);
//string fontPathA = "/Users/Ingy/Desktop/battleeee/battleeee/data/Fonts/English/font1.ttf";
fontPathF = resourcePath() + "font4.ttf";
cursorPathE= resourcePath() + "cursor1.png";
cursorPathF= resourcePath() + "cursor3.png";
cursorTexture.loadFromFile(cursorPathE);
this->difficulty='H';
}
Settings::~Settings ()
{
}
void Settings:: updateFont()
{
if(language=="English")
overallFont.loadFromFile(fontPathE);
if(language=="French")
overallFont.loadFromFile(fontPathF);
if(language=="Arabic")
overallFont.loadFromFile(fontPathA);
}
void Settings:: updateCursor()
{
if(language=="English")
cursorTexture.loadFromFile(cursorPathE);
if(language=="French")
cursorTexture.loadFromFile(cursorPathF);
if(language=="Arabic")
cursorTexture.loadFromFile(cursorPathA);
}