|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
#include <WidgetComponent.h>
Classes | |
| struct | Resolution |
Public Member Functions | |
| WidgetComponent (Entities::Scene *scene) | |
| std::string | getComponentName () const override |
| Gets the component type name for debugging/UI. | |
| Resolution | getRequestedResolution () const |
| void | setRequestedResolution (uint32_t width, uint32_t height) |
| bool | isWorldUiActive () const |
| void | setWorldUiActive (bool active) |
| uint32_t | getWorldUiDescriptorIndex () const |
| void | setWorldUiDescriptorIndex (uint32_t descriptorIndex) |
| void | clearWorldUiDescriptorIndex () |
| virtual void | drawRuntimeImGui () |
| void | selectNextUpgrade () |
| void | selectPreviousUpgrade () |
| void | buySelectedUpgrade () |
| Public Member Functions inherited from Engine::Components::Logic | |
| Logic (Entities::Scene *owningScene) | |
| Logic (const Entities::SpawnContext &context) | |
| virtual | ~Logic ()=default |
| virtual bool | drawImGui () |
| Draws component-specific ImGui inspector controls. | |
| virtual bool | drawImGuiName () |
| Used to alter the name of the entity in the outliner. | |
| virtual void | beginPlay () |
| Called when the component is added to the scene or the game starts. | |
| virtual void | tick (double deltaTime) |
| Called every frame if ticking is enabled. | |
| virtual void | endPlay () |
| Called when the component is removed or the game ends. | |
| bool | hasBegunPlay () const |
| bool | canTick () const |
| Checks if the component is currently set to tick. | |
| void | setCanTick (bool enable) |
| Enables or disables ticking for this component. | |
| Entities::Entity * | getOwningEntity () const |
| Gets the entity this component belongs to. | |
Static Public Attributes | |
| static constexpr bool | IsUnique = false |
| Static Public Attributes inherited from Engine::Components::Logic | |
| static constexpr bool | IsUnique = false |
| Defines whether multiple instances of this component can exist on the same entity. Defaults to false (multiple allowed). Override in derived classes with static constexpr bool IsUnique =
true; if needed. | |
| static constexpr const char * | ComponentName = "Logic" |
| Fallback component type name. Derived classes may override getComponentName() for custom labels. | |
Private Attributes | |
| Resolution | resolution_ {} |
| bool | active_ = true |
| uint32_t | descriptorIndex_ = std::numeric_limits<uint32_t>::max() |
| int | selectedUpgrade_ = 0 |
| int | credits_ = 120 |
| int | purchaseCount_ = 0 |
Additional Inherited Members | |
| Protected Member Functions inherited from Engine::Components::Logic | |
| Entities::Scene * | getScene () const |
| Gets the scene this component belongs to. | |
| Core::SceneManager * | getSceneManager () const |
| Helper to get the SceneManager from the owning scene. | |
Runtime ImGui widget that can be rendered into a world-space UI texture. Interaction is driven by gameplay/physical button code mutating this state.
Definition at line 15 of file WidgetComponent.h.
|
explicit |
| void Engine::Components::WidgetComponent::buySelectedUpgrade | ( | ) |
| void Engine::Components::WidgetComponent::clearWorldUiDescriptorIndex | ( | ) |
|
virtual |
|
nodiscardoverridevirtual |
Gets the component type name for debugging/UI.
Reimplemented from Engine::Components::Logic.
|
nodiscard |
|
nodiscard |
|
nodiscard |
| void Engine::Components::WidgetComponent::selectNextUpgrade | ( | ) |
| void Engine::Components::WidgetComponent::selectPreviousUpgrade | ( | ) |
| void Engine::Components::WidgetComponent::setRequestedResolution | ( | uint32_t | width, |
| uint32_t | height ) |
| void Engine::Components::WidgetComponent::setWorldUiActive | ( | bool | active | ) |
| void Engine::Components::WidgetComponent::setWorldUiDescriptorIndex | ( | uint32_t | descriptorIndex | ) |
|
private |
Definition at line 48 of file WidgetComponent.h.
|
private |
Definition at line 52 of file WidgetComponent.h.
|
private |
Definition at line 49 of file WidgetComponent.h.
|
staticconstexpr |
Definition at line 24 of file WidgetComponent.h.
|
private |
Definition at line 53 of file WidgetComponent.h.
|
private |
Definition at line 47 of file WidgetComponent.h.
|
private |
Definition at line 51 of file WidgetComponent.h.