Smolgui
Immediate gui library based on SFML
Loading...
Searching...
No Matches
SerializeGUI.h
Go to the documentation of this file.
1#pragma once
2
3#include <nlohmann/json.hpp>
7
8namespace sgui
9{
13NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (FontSize, normal, title, subtitle, footnote);
17NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (Style, fontSize, fontColor, itemSpacing);
21NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (Panel, movable, visible, closable, hasHeader, size, position, title);
25NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (Constraints, vertical, horizontal, relativePosition);
33NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (LayoutEntry, panel, position, constraints, window);
34
39 {VerticalAlignment::None, "VerticalAlignment::None"},
40 {VerticalAlignment::Top, "VerticalAlignment::Top"},
41 {VerticalAlignment::Bottom, "VerticalAlignment::Bottom"},
42 {VerticalAlignment::Center, "VerticalAlignment::Center"},
43})
48 {HorizontalAlignment::None, "HorizontalAlignment::None"},
49 {HorizontalAlignment::Left, "HorizontalAlignment::Left"},
50 {HorizontalAlignment::Right, "HorizontalAlignment::Right"},
51 {HorizontalAlignment::Center, "HorizontalAlignment::Center"},
52})
53
54} // namespace sgui
Definition Interpolation.h:16
NLOHMANN_JSON_SERIALIZE_ENUM(VerticalAlignment, { {VerticalAlignment::None, "VerticalAlignment::None"}, {VerticalAlignment::Top, "VerticalAlignment::Top"}, {VerticalAlignment::Bottom, "VerticalAlignment::Bottom"}, {VerticalAlignment::Center, "VerticalAlignment::Center"}, }) NLOHMANN_JSON_SERIALIZE_ENUM(HorizontalAlignment
HorizontalAlignment
List all possible horizontal alignment.
Definition Constraints.h:24
@ Center
Definition Constraints.h:26
@ None
Definition Constraints.h:28
@ Right
Definition Constraints.h:27
@ Left
Definition Constraints.h:25
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Frames, count, texture)
VerticalAlignment
List all possible vertical alignment.
Definition Constraints.h:13
@ Bottom
Definition Constraints.h:16
@ Center
Definition Constraints.h:15
@ None
Definition Constraints.h:17
@ Top
Definition Constraints.h:14
Store constraints on position for gui panel. Alignment always precede relative position.
Definition Constraints.h:36
font size container
Definition Style.h:14
Data structure stored in Layout. Its a dumb std::variant basically...
Definition Layout.h:18
store panel posiiton, size and some parameters
Definition Panel.h:16
define gui font style and padding
Definition Style.h:27
small struct to ease use of beginPanel and beginWindow in Gui
Definition Panel.h:41