Loading...
Searching...
No Matches
SideMenuSettings.h
Go to the documentation of this file.
1// SideMenuSettings.h
2#ifndef MALENA_SIDEMENUSETTINGS_H
3#define MALENA_SIDEMENUSETTINGS_H
4#pragma once
7
8namespace ml
9{
11 {
12 enum class Mode { OVERLAY, PUSH };
13 enum class Anchor { LEFT, RIGHT };
14
17 float panelWidth = 280.f;
18 float panelHeight = 0.f;
19 float animDuration = 0.25f;
20 float hamburgerSize = 48.f;
21
23 { static_cast<ControlSettings&>(*this) = c; return *this; }
25 { static_cast<ControlSettings&>(*this) = g; return *this; }
26
27 void setMode(Mode m) { mode = m; }
28 void setAnchor(Anchor a) { anchor = a; }
29 void setPanelWidth(float w) { panelWidth = w; }
30 void setPanelHeight(float h) { panelHeight = h; }
31 void setAnimDuration(float d) { animDuration = d; }
32 void setHamburgerSize(float s) { hamburgerSize = s; }
33 };
34} // namespace ml
35#endif
Definition Component.h:22
Settings trait for interactive UI controls — layout only.
Base settings trait for all visual components — geometry only.
void setAnchor(Anchor a)
void setPanelWidth(float w)
SideMenuSettings & operator=(const GraphicSettings &g)
void setAnimDuration(float d)
SideMenuSettings & operator=(const ControlSettings &c)
float hamburgerSize
hit-area square
void setHamburgerSize(float s)
float panelHeight
0 = use window height
void setPanelHeight(float h)