Subscenes
This commit is contained in:
@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user