mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Add size set function to GuiComponent
Similar to #92...
This commit is contained in:
parent
ac51656527
commit
45ed6ae4da
|
@ -102,6 +102,19 @@ Vector2u GuiComponent::getSize()
|
|||
return mSize;
|
||||
}
|
||||
|
||||
void GuiComponent::setSize(Vector2u size)
|
||||
{
|
||||
mSize = size;
|
||||
onSizeChanged();
|
||||
}
|
||||
|
||||
void GuiComponent::setSize(unsigned int w, unsigned int h)
|
||||
{
|
||||
mSize.x = w;
|
||||
mSize.y = h;
|
||||
onSizeChanged();
|
||||
}
|
||||
|
||||
//Children stuff.
|
||||
void GuiComponent::addChild(GuiComponent* cmp)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,9 @@ public:
|
|||
virtual void onOffsetChanged() {};
|
||||
|
||||
Vector2u getSize();
|
||||
void setSize(Vector2u size);
|
||||
void setSize(unsigned int w, unsigned int h);
|
||||
virtual void onSizeChanged() {};
|
||||
|
||||
void setParent(GuiComponent* parent);
|
||||
GuiComponent* getParent();
|
||||
|
|
Loading…
Reference in a new issue