Lots of UI Component Updates

This commit is contained in:
2022-10-27 08:16:55 -07:00
parent d848fdb096
commit a7049ffc31
25 changed files with 387 additions and 56 deletions

View File

@@ -16,6 +16,7 @@ namespace Dawn {
public:
SceneItem &item;
Transform &transform;
bool_t hasInitialized = false;
/**
* Constructs a new SceneItemComponent. Components are attached to
@@ -28,9 +29,17 @@ namespace Dawn {
/**
* Requested on the first frame that the parent scene item has become
* active.
* active, after all of my dependencies are ready.
*/
virtual void start() = 0;
void init();
/**
* Optionally return all dependencies for this component to wait for init
* for before the component will be initialized.
*
* @return Array of dependencies.
*/
virtual std::vector<SceneItemComponent*> getDependencies();
/**
* Shorthand to return the scene that this component's item belongs to.
@@ -44,6 +53,11 @@ namespace Dawn {
*/
DawnGame & getGame();
/**
* Same as init, but intended for your subclass to override.
*/
virtual void onStart();
/**
* Cleanup the SceneItemComponent.
*/