Capycore Engine  0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
Loading...
Searching...
No Matches
ui_image.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
7
8class UIImage : public UIObject {
9public:
11 Scene& scene,
12 std::string image_path,
13 float width,
14 float height,
17 );
18
19 void update(float dt) override;
20
21 [[nodiscard]] const std::string& image_path() const;
22 UIImage& image_path(const std::string& path);
23
24 [[nodiscard]] Color color() const;
26
27private:
28 std::string image_path_;
29 Color color_;
30};
Represents a color with red, green, blue, and alpha components. Each component is represented as an u...
Definition color.h:7
std::optional< std::reference_wrapper< T > > get_component() const noexcept
Get the first component of type T attached to this GameObject.
Definition gameObject.h:141
Scene & scene() const noexcept
Represents a point in 2D space.
Definition point.h:6
Represents a scene within the engine. A scene contains multiple GameObjects and manages their lifecyc...
Definition scene.h:19
Definition ui_image.h:8
const std::string & image_path() const
UIImage & image_path(const std::string &path)
void update(float dt) override
Update the UI object.
Color color() const
UIImage(Scene &scene, std::string image_path, float width, float height, Point pivot, Point anchor)
UIImage & color(Color color)
Base class for all UI objects.
Definition ui_object.h:16
Point pivot() const
float height() const
Point anchor() const
float width() const