Colobot
settings.h
1 /*
2  * This file is part of the Colobot: Gold Edition source code
3  * Copyright (C) 2001-2015, 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/singleton.h"
23 
24 #include "math/point.h"
25 
26 namespace Gfx
27 {
28 struct DeviceConfig;
29 }
30 
31 class CSettings : public CSingleton<CSettings>
32 {
33 public:
34  CSettings();
35  void SaveResolutionSettings(const Gfx::DeviceConfig& config);
36  void SaveSettings();
37  void LoadSettings();
38 
39 
40  void SetTooltips(bool tooltips);
41  bool GetTooltips();
42 
43  void SetInterfaceGlint(bool interfaceGlint);
44  bool GetInterfaceGlint();
45 
46  void SetInterfaceRain(bool interfaceRain);
47  bool GetInterfaceRain();
48 
49  void SetSoluce4(bool soluce4);
50  bool GetSoluce4();
51 
52  void SetMovies(bool movies);
53  bool GetMovies();
54 
55  void SetSystemMouse(bool systemMouse);
56  bool GetSystemMouse();
57 
58 
60 
61  void SetFontSize(float size);
62  float GetFontSize();
64 
66 
67  void SetWindowPos(Math::Point pos);
68  Math::Point GetWindowPos();
69 
70  void SetWindowDim(Math::Point dim);
71  Math::Point GetWindowDim();
73 
75 
76  void SetIOPublic(bool mode);
77  bool GetIOPublic();
78 
79  void SetIOPos(Math::Point pos);
80  Math::Point GetIOPos();
81 
82  void SetIODim(Math::Point dim);
83  Math::Point GetIODim();
85 
86 protected:
87  bool m_tooltips;
88  bool m_interfaceGlint;
89  bool m_interfaceRain;
90  bool m_soluce4;
91  bool m_movies;
92  bool m_systemMouse;
93 
94  float m_fontSize;
95  Math::Point m_windowPos;
96  Math::Point m_windowDim;
97 
98  bool m_IOPublic;
99  Math::Point m_IOPos;
100  Math::Point m_IODim;
101 };
CSingleton base class for singletons.
void SetWindowPos(Math::Point pos)
Managing the size of the default window.
Definition: settings.cpp:348
Point struct and related functions.
Definition: singleton.h:30
General config for graphics device.
Definition: device.h:55
Definition: settings.h:31
2D point
Definition: point.h:50
void SetIOPublic(bool mode)
Managing windows open/save.
Definition: settings.cpp:374
Namespace for (new) graphics code.
Definition: app.h:49
void SetFontSize(float size)
Managing the size of the default fonts.
Definition: settings.cpp:336