Merging r6186 through r6192 from trunk to ogl-es branch

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6193 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2021-02-21 16:37:56 +00:00
parent 1f7c1830cb
commit 3a54e8d6b8
10 changed files with 71 additions and 40 deletions

View File

@ -209,6 +209,29 @@ public:
}
}
//! How left element border is aligned when parent is resized
EGUI_ALIGNMENT getAlignLeft() const
{
return AlignLeft;
}
//! How right element border is aligned when parent is resized
EGUI_ALIGNMENT getAlignRight() const
{
return AlignRight;
}
//! How top element border is aligned when parent is resized
EGUI_ALIGNMENT getAlignTop() const
{
return AlignTop;
}
//! How bottom element border is aligned when parent is resized
EGUI_ALIGNMENT getAlignBottom() const
{
return AlignBottom;
}
//! Updates the absolute position.
virtual void updateAbsolutePosition()

View File

@ -135,16 +135,20 @@ namespace core
if (other.LowerRightCorner.Y < LowerRightCorner.Y)
LowerRightCorner.Y = other.LowerRightCorner.Y;
if (other.UpperLeftCorner.X > LowerRightCorner.X)
LowerRightCorner.X = other.UpperLeftCorner.X;
if (other.UpperLeftCorner.Y > LowerRightCorner.Y)
LowerRightCorner.Y = other.UpperLeftCorner.Y;
if (other.LowerRightCorner.X < UpperLeftCorner.X)
UpperLeftCorner.X = other.LowerRightCorner.X;
if (other.LowerRightCorner.Y < UpperLeftCorner.Y)
UpperLeftCorner.Y = other.LowerRightCorner.Y;
if (other.UpperLeftCorner.X > UpperLeftCorner.X)
UpperLeftCorner.X = other.UpperLeftCorner.X;
if (other.UpperLeftCorner.Y > UpperLeftCorner.Y)
UpperLeftCorner.Y = other.UpperLeftCorner.Y;
// correct possible invalid rect resulting from clipping
if (UpperLeftCorner.Y > LowerRightCorner.Y)
UpperLeftCorner.Y = LowerRightCorner.Y;
if (UpperLeftCorner.X > LowerRightCorner.X)
UpperLeftCorner.X = LowerRightCorner.X;
}
//! Moves this rectangle to fit inside another one.