Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
WidgetComponent.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <cstdint>
6#include <limits>
7#include <string>
8
9namespace Engine::Components
10{
15 class WidgetComponent : public Logic
16 {
17 public:
19 {
20 uint32_t width = 1024;
21 uint32_t height = 512;
22 };
23
24 static constexpr bool IsUnique = false;
25
26 explicit WidgetComponent( Entities::Scene * scene );
27
28 [[nodiscard]] std::string getComponentName() const override;
29
30 [[nodiscard]] Resolution getRequestedResolution() const;
31 void setRequestedResolution( uint32_t width, uint32_t height );
32
33 [[nodiscard]] bool isWorldUiActive() const;
34 void setWorldUiActive( bool active );
35
36 [[nodiscard]] uint32_t getWorldUiDescriptorIndex() const;
37 void setWorldUiDescriptorIndex( uint32_t descriptorIndex );
39
40 virtual void drawRuntimeImGui();
41
45
46 private:
48 bool active_ = true;
49 uint32_t descriptorIndex_ = std::numeric_limits<uint32_t>::max();
50
52 int credits_ = 120;
54 };
55} // namespace Engine::Components
Logic(Entities::Scene *owningScene)
uint32_t getWorldUiDescriptorIndex() const
void setWorldUiDescriptorIndex(uint32_t descriptorIndex)
Resolution getRequestedResolution() const
WidgetComponent(Entities::Scene *scene)
std::string getComponentName() const override
Gets the component type name for debugging/UI.
void setRequestedResolution(uint32_t width, uint32_t height)
A scene is the overarching structure which can spawn, contain and destroy actors or entities.
Definition Scene.h:62