Fixed CSV Parsing on tools
This commit is contained in:
@ -16,12 +16,15 @@ namespace Dawn {
|
||||
};
|
||||
|
||||
class UIComponent;
|
||||
struct UIMenu;
|
||||
|
||||
class UICanvas : public SceneItemComponent {
|
||||
protected:
|
||||
Camera *camera = nullptr;
|
||||
struct UIMenu *currentMenu = nullptr;
|
||||
|
||||
void onRenderTargetResize(float_t w, float_t h);
|
||||
void onSceneUpdate();
|
||||
|
||||
public:
|
||||
/**
|
||||
@ -33,7 +36,7 @@ namespace Dawn {
|
||||
*/
|
||||
static UICanvas * create(Scene *scene);
|
||||
|
||||
//
|
||||
//======================================================================//
|
||||
std::vector<UIComponent*> children;
|
||||
UIDrawType drawType = UI_DRAW_TYPE_WORLD_CAMERA_RELATIVE;
|
||||
|
||||
@ -64,6 +67,12 @@ namespace Dawn {
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a UI Element attached to this canvas.
|
||||
*
|
||||
* @tparam Type of the UI item to find.
|
||||
* @return Pointer to first matching element of type T.
|
||||
*/
|
||||
template<class T>
|
||||
T * findElement() {
|
||||
auto it = this->children.begin();
|
||||
@ -90,6 +99,20 @@ namespace Dawn {
|
||||
*/
|
||||
float_t getHeight();
|
||||
|
||||
/**
|
||||
* Returns the currently active menu for this UI Canvas.
|
||||
*
|
||||
* @return The currently active menu, or nullptr if there is none.
|
||||
*/
|
||||
struct UIMenu * getCurrentMenu();
|
||||
|
||||
/**
|
||||
* Sets the currently active menu, and ticks it appropriately.
|
||||
*
|
||||
* @param menu Menu to set as the current active menu.
|
||||
*/
|
||||
void setCurrentMenu(struct UIMenu *menu);
|
||||
|
||||
void onStart() override;
|
||||
void onDispose() override;
|
||||
};
|
||||
|
Reference in New Issue
Block a user