ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imgui_utils.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #include "backends/imgui/IconsMaterialSymbols.h"
23 
24 #ifndef IMGUI_DEFINE_MATH_OPERATORS
25 #define IMGUI_DEFINE_MATH_OPERATORS
26 #endif
27 
28 #include "backends/imgui/imgui.h"
29 #include "graphics/palette.h"
30 
31 namespace ImGuiEx {
32 
33 template<typename INT>
34 bool InputInt(const char *label, INT *v, int step = 1, int step_fast = 100, ImGuiInputTextFlags flags = 0) {
35  int tmp = (int)*v;
36  if (ImGui::InputInt(label, &tmp, step, step_fast, flags)) {
37  *v = (INT)tmp;
38  return true;
39  }
40  return false;
41 }
42 
43 void Boolean(bool val);
44 void Palette(const Graphics::Palette &palette);
45 bool toggleButton(const char *label, bool *p_value, bool inverse = false);
46 
47 } // namespace ImGuiEx
Definition: imgui_logger.h:31
Simple class for handling a palette data.
Definition: palette.h:51
Definition: atari-screen.h:44