vkmEngine 1.0.15
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
ui_toggle.h
1#pragma once
2
3#include <glm/glm.hpp>
4
5#include "core/reflect.h"
6#include "ecs/entity.h"
7
8namespace Vkm::Engine {
9
20struct UIToggle {
21 bool on = false;
22 glm::vec4 onColor = {0.0f, 0.0f, 0.0f, 0.0f};
23
25};
26
27} // namespace Vkm::Engine
28
29VKM_REFLECT_BEGIN(::Vkm::Engine::UIToggle)
30 VKM_F(on)
31 VKM_F(onColor)
32VKM_REFLECT_END()
Names one entity of one Scene, for as long as that slot holds it.
Definition entity.h:23
A UIButton that is on or off, flipped by its click.
Definition ui_toggle.h:20
glm::vec4 onColor
The button at rest while on; clear keeps normalColor.
Definition ui_toggle.h:22
EntityId knob
Slid to the end that says the state; none for no knob.
Definition ui_toggle.h:24
bool on
Write it to set the toggle.
Definition ui_toggle.h:21