Colobot
settings.h
1 /*
2  * This file is part of the Colobot: Gold Edition source code
3  * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
4  * http://epsitec.ch; http://colobot.info; http://github.com/colobot
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see http://gnu.org/licenses
18  */
19 
20 #pragma once
21 
22 #include "common/language.h"
23 #include "common/singleton.h"
24 
25 #include "math/point.h"
26 
27 namespace Gfx
28 {
29 struct DeviceConfig;
30 }
31 
32 class CSettings : public CSingleton<CSettings>
33 {
34 public:
35  CSettings();
36  void SaveResolutionSettings(const Gfx::DeviceConfig& config);
37  void SaveSettings();
38  void LoadSettings();
39 
40 
41  void SetTooltips(bool tooltips);
42  bool GetTooltips();
43 
44  void SetInterfaceGlint(bool interfaceGlint);
45  bool GetInterfaceGlint();
46 
47  void SetInterfaceRain(bool interfaceRain);
48  bool GetInterfaceRain();
49 
50  void SetSoluce4(bool soluce4);
51  bool GetSoluce4();
52 
53  void SetMovies(bool movies);
54  bool GetMovies();
55 
56  void SetFocusLostPause(bool focusLostPause);
57  bool GetFocusLostPause();
58 
59 
61 
62  void SetFontSize(float size);
63  float GetFontSize();
65 
67 
68  void SetWindowPos(Math::Point pos);
69  Math::Point GetWindowPos();
70 
71  void SetWindowDim(Math::Point dim);
72  Math::Point GetWindowDim();
74 
76 
77  void SetIOPublic(bool mode);
78  bool GetIOPublic();
79 
80  void SetIOPos(Math::Point pos);
81  Math::Point GetIOPos();
82 
83  void SetIODim(Math::Point dim);
84  Math::Point GetIODim();
86 
87  void SetLanguage(Language language);
88  Language GetLanguage();
89 
90 protected:
91  bool m_tooltips;
92  bool m_interfaceGlint;
93  bool m_interfaceRain;
94  bool m_soluce4;
95  bool m_movies;
96  bool m_focusLostPause;
97 
98  float m_fontSize;
99  Math::Point m_windowPos;
100  Math::Point m_windowDim;
101 
102  bool m_IOPublic;
103  Math::Point m_IOPos;
104  Math::Point m_IODim;
105 
106  Language m_language;
107 };
CSingleton base class for singletons.
Point struct and related functions.
Definition: singleton.h:30
General config for graphics device.
Definition: device.h:64
Definition: settings.h:32
2D point
Definition: point.h:50
Namespace for (new) graphics code.
Definition: app.h:49