Canvas Component

Added a canvas component. No functionality added yet
This commit is contained in:
maverickdgg 2022-11-10 13:01:31 +08:00
parent 740c144565
commit e4e4894610
2 changed files with 36 additions and 1 deletions

View File

@ -399,7 +399,7 @@ namespace SHADE
SHVec3 up = { 0.0f,1.0f,0.0f };
////SHVec3::RotateZ(target, SHMath::DegreesToRadians(camera.roll));
//SHVec3::RotateZ(target, SHMath::DegreesToRadians(camera.roll));
//target = SHVec3::Normalise(target);

View File

@ -0,0 +1,35 @@
#pragma once
#include "SH_API.h"
#include "ECS_Base/Components/SHComponent.h"
namespace SHADE
{
class SH_API SHCanvasComponent final: public SHComponent
{
using CanvasSizeType = uint32_t;
public:
SHCanvasComponent();
~SHCanvasComponent() = default;
void SetCanvasSize(CanvasSizeType width, CanvasSizeType height) noexcept;
void SetCanvasWidth(CanvasSizeType width) noexcept;
void SetCanvasHeight(CanvasSizeType height) noexcept;
CanvasSizeType const GetCanvasWidth() const noexcept;
CanvasSizeType const GetCanvasHeight() const noexcept;
private:
CanvasSizeType width;
CanvasSizeType height;
};
}