Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp::ecs::components::ui::SpritePreview Struct Reference

Component for displaying a sprite preview in the UI. More...

#include <SpritePreview.hpp>

Collaboration diagram for rtp::ecs::components::ui::SpritePreview:

Public Attributes

std::string texturePath
 Path to the texture file.
 
float x {0.0f}
 X position for rendering.
 
float y {0.0f}
 Y position for rendering.
 
float scale {1.0f}
 Scale factor for display.
 
int rectLeft {0}
 Left coordinate in texture.
 
int rectTop {0}
 Top coordinate in texture.
 
int rectWidth {0}
 Width of sprite in texture.
 
int rectHeight {0}
 Height of sprite in texture.
 
int zIndex {0}
 Rendering order.
 

Detailed Description

Component for displaying a sprite preview in the UI.

This component holds information about a sprite to display, including texture path and rectangle coordinates for extracting a specific portion of the texture (for sprite sheets).

Definition at line 23 of file SpritePreview.hpp.

Member Data Documentation

◆ rectHeight

int rtp::ecs::components::ui::SpritePreview::rectHeight {0}

Height of sprite in texture.

Definition at line 33 of file SpritePreview.hpp.

Referenced by rtp::client::graphics::UiFactory::createSpritePreview().

◆ rectLeft

int rtp::ecs::components::ui::SpritePreview::rectLeft {0}

Left coordinate in texture.

Definition at line 30 of file SpritePreview.hpp.

Referenced by rtp::client::graphics::UiFactory::createSpritePreview().

◆ rectTop

int rtp::ecs::components::ui::SpritePreview::rectTop {0}

Top coordinate in texture.

Definition at line 31 of file SpritePreview.hpp.

Referenced by rtp::client::graphics::UiFactory::createSpritePreview().

◆ rectWidth

int rtp::ecs::components::ui::SpritePreview::rectWidth {0}

Width of sprite in texture.

Definition at line 32 of file SpritePreview.hpp.

Referenced by rtp::client::graphics::UiFactory::createSpritePreview().

◆ scale

float rtp::ecs::components::ui::SpritePreview::scale {1.0f}

Scale factor for display.

Definition at line 27 of file SpritePreview.hpp.

Referenced by rtp::client::graphics::UiFactory::createSpritePreview().

◆ texturePath

std::string rtp::ecs::components::ui::SpritePreview::texturePath

Path to the texture file.

Definition at line 24 of file SpritePreview.hpp.

Referenced by rtp::client::graphics::UiFactory::createSpritePreview().

◆ x

float rtp::ecs::components::ui::SpritePreview::x {0.0f}

X position for rendering.

Definition at line 25 of file SpritePreview.hpp.

Referenced by rtp::client::graphics::UiFactory::createSpritePreview().

◆ y

float rtp::ecs::components::ui::SpritePreview::y {0.0f}

Y position for rendering.

Definition at line 26 of file SpritePreview.hpp.

Referenced by rtp::client::graphics::UiFactory::createSpritePreview().

◆ zIndex

int rtp::ecs::components::ui::SpritePreview::zIndex {0}

Rendering order.

Definition at line 35 of file SpritePreview.hpp.

Referenced by rtp::client::graphics::UiFactory::createSpritePreview().


The documentation for this struct was generated from the following file: