ScummVM API documentation
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#ifndef IMGUI_IMGUI_UTILS_H
23#define IMGUI_IMGUI_UTILS_H
24
25#include "backends/imgui/IconsMaterialSymbols.h"
26
27#ifndef IMGUI_DEFINE_MATH_OPERATORS
28#define IMGUI_DEFINE_MATH_OPERATORS
29#endif
30
31#include "backends/imgui/imgui.h"
32#include "graphics/palette.h"
33
34namespace ImGuiEx {
35
36template<typename INT>
37bool InputInt(const char *label, INT *v, int step = 1, int step_fast = 100, ImGuiInputTextFlags flags = 0) {
38 int tmp = (int)*v;
39 if (ImGui::InputInt(label, &tmp, step, step_fast, flags)) {
40 *v = (INT)tmp;
41 return true;
42 }
43 return false;
44}
45
46void Boolean(bool val);
47void Palette(const Graphics::Palette &palette);
48bool toggleButton(const char *label, bool *p_value, bool inverse = false);
49
50} // namespace ImGuiEx
51
52#endif // IMGUI_IMGUI_UTILS_H
Simple class for handling a palette data.
Definition: palette.h:61
Definition: atari-screen.h:42