Loading...
Searching...
No Matches
ModalSettings.h
Go to the documentation of this file.
1#ifndef MALENA_MODALSETTINGS_H
2#define MALENA_MODALSETTINGS_H
3
4#pragma once
5
8
9namespace ml
10{
12 {
13 sf::Vector2f modalSize = {420.f, 300.f};
14 float cornerRadius = 12.f;
15 float titleBarHeight = 50.f;
16 float buttonBarHeight = 56.f;
17 bool dismissOnBackdrop = true;
18 bool showCloseButton = true;
19
21 { static_cast<ControlSettings&>(*this) = c; return *this; }
22
23 void setModalSize(const sf::Vector2f& s) { modalSize = s; }
24 void setCornerRadius(float r) { cornerRadius = r; }
25 void setTitleBarHeight(float h) { titleBarHeight = h; }
26 void setButtonBarHeight(float h) { buttonBarHeight = h; }
28 void setShowCloseButton(bool v) { showCloseButton = v; }
29 };
30
31} // namespace ml
32
33#endif // MALENA_MODALSETTINGS_H
Definition Component.h:22
Vector2< float > Vector2f
Settings trait for interactive UI controls — layout only.
void setModalSize(const sf::Vector2f &s)
void setTitleBarHeight(float h)
void setDismissOnBackdrop(bool v)
void setShowCloseButton(bool v)
void setCornerRadius(float r)
ModalSettings & operator=(const ControlSettings &c)
void setButtonBarHeight(float h)
sf::Vector2f modalSize