mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-02 02:05:25 +00:00
Merging with develop
This commit is contained in:
@@ -33,13 +33,47 @@ namespace RAY::Drawables::Drawables2D
|
||||
return *this;
|
||||
}
|
||||
|
||||
Rectangle &Rectangle::setDimensions(int x, int y)
|
||||
Rectangle &Rectangle::setDimensions(float x, float y)
|
||||
{
|
||||
this->_dimensions.x = x;
|
||||
this->_dimensions.y = y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
float Rectangle::getHeight(void) const
|
||||
{
|
||||
return this->_dimensions.y;
|
||||
}
|
||||
|
||||
float Rectangle::getWidth(void) const
|
||||
{
|
||||
return this->_dimensions.x;
|
||||
}
|
||||
|
||||
Rectangle &Rectangle::incrementWidth(float width)
|
||||
{
|
||||
this->_dimensions.x += width;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Rectangle &Rectangle::incrementHeight(float height)
|
||||
{
|
||||
this->_dimensions.y += height;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Rectangle &Rectangle::setWidth(float width)
|
||||
{
|
||||
this->_dimensions.x = width;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Rectangle &Rectangle::setHeight(float height)
|
||||
{
|
||||
this->_dimensions.y = height;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Rectangle::drawOn(RAY::Window &)
|
||||
{
|
||||
DrawRectangleV(this->_position, this->_dimensions, this->_color);
|
||||
|
||||
@@ -42,11 +42,33 @@ namespace RAY::Drawables::Drawables2D {
|
||||
//! @return the dimensions of the rectangle
|
||||
const Vector2 &getDimensions(void);
|
||||
|
||||
//! @return the width of the rectangle
|
||||
float getWidth(void) const;
|
||||
|
||||
//! @return the height of the rectangle
|
||||
float getHeight(void) const;
|
||||
|
||||
//! @brief set dimensions
|
||||
Rectangle &setDimensions(const Vector2 &dimensions);
|
||||
|
||||
//! @brief increment width of the rectangle
|
||||
//! @param width incrementer
|
||||
Rectangle &incrementWidth(float width);
|
||||
|
||||
//! @brief increment height of the rectangle
|
||||
//! @param height incrementer
|
||||
Rectangle &incrementHeight(float height);
|
||||
|
||||
//! @brief set rectangle's height
|
||||
//! @param height height of the rectangle
|
||||
Rectangle &setHeight(float height);
|
||||
|
||||
//! @brief set rectangle's width
|
||||
//! @param width width of the rectangle
|
||||
Rectangle &setWidth(float width);
|
||||
|
||||
//! @brief set dimensions
|
||||
Rectangle &setDimensions(int x, int y);
|
||||
Rectangle &setDimensions(float x, float y);
|
||||
|
||||
//! @brief Draw point on window
|
||||
virtual void drawOn(RAY::Window &) override;
|
||||
|
||||
Reference in New Issue
Block a user