Updated some docs
This commit is contained in:
@ -19,6 +19,15 @@ namespace Dawn {
|
||||
|
||||
class UIComponentRenderable {
|
||||
public:
|
||||
/**
|
||||
* Implemented UI Components that have rendering should implement this and
|
||||
* return their rendering items. Items are passed back to the render
|
||||
* pipeline.
|
||||
*
|
||||
* @param projection Camera projection, obtained from the canvas.
|
||||
* @param view Camera view, obtained from the canvas.
|
||||
* @return A list of renderable shader pass items for this renderable.
|
||||
*/
|
||||
virtual std::vector<struct ShaderPassItem> getPassItems(
|
||||
glm::mat4 projection,
|
||||
glm::mat4 view
|
||||
@ -27,13 +36,22 @@ namespace Dawn {
|
||||
|
||||
class UIComponent : public SceneItemComponent, public UIComponentDimensional {
|
||||
protected:
|
||||
// Calculated (and cached) values
|
||||
float_t width = 1;
|
||||
float_t height = 1;
|
||||
|
||||
StateEvent<> eventAlignmentUpdated;
|
||||
|
||||
/**
|
||||
* Simply returns this UI Components' dimensional parent, used for the
|
||||
* alignment of this item.
|
||||
*
|
||||
* @return Pointer to the parent dimensional.
|
||||
*/
|
||||
UIComponentDimensional * getParentDimensional();
|
||||
|
||||
/**
|
||||
* Internal method to update the alignment of this item.
|
||||
*/
|
||||
void updateAlignment();
|
||||
|
||||
public:
|
||||
@ -58,8 +76,6 @@ namespace Dawn {
|
||||
glm::vec2 alignment
|
||||
);
|
||||
|
||||
//
|
||||
|
||||
StateProperty<UIComponentAlign> alignX;
|
||||
StateProperty<UIComponentAlign> alignY;
|
||||
StateProperty<glm::vec4> alignment;
|
||||
@ -68,7 +84,6 @@ namespace Dawn {
|
||||
|
||||
float_t getWidth() override;
|
||||
float_t getHeight() override;
|
||||
|
||||
void onStart() override;
|
||||
|
||||
friend class UICanvas;
|
||||
|
Reference in New Issue
Block a user