EGDS_MESSAGE_BOX_HEIGHT is now honoured, reported by Spkka
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2243 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
2940de0112
commit
410b95f946
@ -1,5 +1,10 @@
|
|||||||
Changes in 1.6
|
Changes in 1.6
|
||||||
- Fixed a bug in the edit box where events are sometimes sent to a null parent, reported by Sudi
|
|
||||||
|
- EGDS_MESSAGE_BOX_HEIGHT is now honoured, bug reported by Spkka
|
||||||
|
|
||||||
|
- Fixed a bug in the edit box where events are sometimes sent to a null parent, reported by Sudi.
|
||||||
|
|
||||||
|
- Coordinate system fix for OpenGL in SDL device
|
||||||
|
|
||||||
- Added generic console device. You can now use Irrlicht to create and manipuate graphics on a shell where no graphics hardware
|
- Added generic console device. You can now use Irrlicht to create and manipuate graphics on a shell where no graphics hardware
|
||||||
or windowing system is available. To enable it uncomment #define _IRR_USE_CONSOLE_DEVICE_ in IrrCompileConfig.h
|
or windowing system is available. To enable it uncomment #define _IRR_USE_CONSOLE_DEVICE_ in IrrCompileConfig.h
|
||||||
|
@ -80,7 +80,7 @@ void CGUIMessageBox::refreshControls()
|
|||||||
// add static multiline text
|
// add static multiline text
|
||||||
|
|
||||||
core::dimension2d<s32> dim(AbsoluteClippingRect.getWidth() - buttonWidth,
|
core::dimension2d<s32> dim(AbsoluteClippingRect.getWidth() - buttonWidth,
|
||||||
AbsoluteClippingRect.getHeight() - (buttonHeight * 3));
|
AbsoluteClippingRect.getHeight() - (buttonHeight * 2));
|
||||||
const core::position2d<s32> pos((AbsoluteClippingRect.getWidth() - dim.Width) / 2,
|
const core::position2d<s32> pos((AbsoluteClippingRect.getWidth() - dim.Width) / 2,
|
||||||
buttonHeight / 2 + titleHeight);
|
buttonHeight / 2 + titleHeight);
|
||||||
|
|
||||||
@ -104,12 +104,13 @@ void CGUIMessageBox::refreshControls()
|
|||||||
core::rect<s32> tmp = StaticText->getRelativePosition();
|
core::rect<s32> tmp = StaticText->getRelativePosition();
|
||||||
tmp.LowerRightCorner.Y = tmp.UpperLeftCorner.Y + textHeight;
|
tmp.LowerRightCorner.Y = tmp.UpperLeftCorner.Y + textHeight;
|
||||||
StaticText->setRelativePosition(tmp);
|
StaticText->setRelativePosition(tmp);
|
||||||
dim.Height = textHeight;
|
dim.Height = dim.Height - buttonHeight < tmp.getHeight() ? tmp.getHeight() : dim.Height - buttonHeight;
|
||||||
|
|
||||||
// adjust message box height
|
// adjust message box height if required
|
||||||
|
|
||||||
tmp = getRelativePosition();
|
tmp = getRelativePosition();
|
||||||
s32 msgBoxHeight = textHeight + core::floor32(2.5f * buttonHeight) + titleHeight;
|
s32 msgBoxHeight = textHeight + core::floor32(2.5f * buttonHeight) + titleHeight;
|
||||||
|
msgBoxHeight = tmp.getHeight() < msgBoxHeight ? msgBoxHeight : tmp.getHeight();
|
||||||
|
|
||||||
// adjust message box position
|
// adjust message box position
|
||||||
|
|
||||||
@ -133,7 +134,8 @@ void CGUIMessageBox::refreshControls()
|
|||||||
btnRect.UpperLeftCorner.Y = pos.Y + dim.Height + buttonHeight / 2;
|
btnRect.UpperLeftCorner.Y = pos.Y + dim.Height + buttonHeight / 2;
|
||||||
btnRect.LowerRightCorner.Y = btnRect.UpperLeftCorner.Y + buttonHeight;
|
btnRect.LowerRightCorner.Y = btnRect.UpperLeftCorner.Y + buttonHeight;
|
||||||
btnRect.UpperLeftCorner.X = (AbsoluteClippingRect.getWidth() -
|
btnRect.UpperLeftCorner.X = (AbsoluteClippingRect.getWidth() -
|
||||||
((buttonWidth + buttonDistance)*countButtons)) / 2;
|
(buttonWidth*countButtons + (buttonDistance*countButtons+1))) / 2 +
|
||||||
|
buttonDistance / 2;
|
||||||
btnRect.LowerRightCorner.X = btnRect.UpperLeftCorner.X + buttonWidth;
|
btnRect.LowerRightCorner.X = btnRect.UpperLeftCorner.X + buttonWidth;
|
||||||
|
|
||||||
// add/remove ok button
|
// add/remove ok button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user