Subscenes

This commit is contained in:
2023-01-14 22:06:35 -08:00
parent 15e7efb7f3
commit 0558b3bb25
35 changed files with 733 additions and 116 deletions

View File

@ -6,6 +6,7 @@
#pragma once
#include "scene/SceneItemComponent.hpp"
#include "display/RenderTarget.hpp"
#include "scene/components/display/Camera.hpp"
namespace Dawn {
enum UIDrawType {
@ -18,11 +19,9 @@ namespace Dawn {
class UICanvas : public SceneItemComponent {
protected:
void onBackBufferResize(
RenderTarget *target,
float_t width,
float_t height
);
Camera *camera = nullptr;
void onRenderTargetResize(RenderTarget *target, float_t w, float_t h);
public:
/**
@ -45,6 +44,13 @@ namespace Dawn {
*/
UICanvas(SceneItem *item);
/**
* Sets the camera used by the UI canvas.
*
* @param camera Camera to set for the UI canvas.
*/
void setCamera(Camera *camera);
/**
* Construct and append a UI item to this UI Canvas.
*