]> git.lizzy.rs Git - minetest.git/blob - src/client/gameui.h
GameUI refactor (part 1/X): GameUI object creation + GameUIFlags move to GameUI
[minetest.git] / src / client / gameui.h
1 /*
2 Minetest
3 Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4 Copyright (C) 2018 nerzhul, Loic Blot <loic.blot@unix-experience.fr>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 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.  See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License along
17 with this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21 #pragma once
22
23 #include "IGUIEnvironment.h"
24
25 using namespace irr;
26
27 class GameUI
28 {
29         // Temporary between coding time to move things here
30         friend class Game;
31
32 public:
33         // Flags that can, or may, change during main game loop
34         struct Flags
35         {
36                 bool show_chat;
37                 bool show_hud;
38                 bool show_minimap;
39                 bool force_fog_off;
40                 bool show_debug;
41                 bool show_profiler_graph;
42                 bool disable_camera_update;
43         };
44
45         void initFlags();
46         const Flags &getFlags() const { return m_flags; }
47
48         void showMinimap(const bool show);
49
50 private:
51         Flags m_flags;
52
53         // @TODO future move
54         //      gui::IGUIStaticText *m_guitext;          // First line of debug text
55         //      gui::IGUIStaticText *m_guitext2;         // Second line of debug text
56         //      gui::IGUIStaticText *m_guitext_info;     // At the middle of the screen
57         //      gui::IGUIStaticText *m_guitext_status;
58         //      gui::IGUIStaticText *m_guitext_chat;     // Chat text
59         //      gui::IGUIStaticText *m_guitext_profiler; // Profiler text
60 };