mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Increase required MyGUI version to 3.2.2
This commit is contained in:
parent
53d704fec8
commit
9059971a69
@ -312,7 +312,7 @@ if (DEFINED ENV{TRAVIS_BRANCH} OR DEFINED ENV{APPVEYOR})
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||||
find_package(MyGUI 3.2.1 REQUIRED)
|
find_package(MyGUI 3.2.2 REQUIRED)
|
||||||
find_package(SDL2 REQUIRED)
|
find_package(SDL2 REQUIRED)
|
||||||
find_package(OpenAL REQUIRED)
|
find_package(OpenAL REQUIRED)
|
||||||
find_package(Bullet ${REQUIRED_BULLET_VERSION} REQUIRED COMPONENTS BulletCollision LinearMath)
|
find_package(Bullet ${REQUIRED_BULLET_VERSION} REQUIRED COMPONENTS BulletCollision LinearMath)
|
||||||
|
@ -254,16 +254,6 @@ namespace MWGui
|
|||||||
if (plainText.size() && brAtEnd)
|
if (plainText.size() && brAtEnd)
|
||||||
plainText.erase(plainText.end()-1);
|
plainText.erase(plainText.end()-1);
|
||||||
|
|
||||||
#if (MYGUI_VERSION < MYGUI_DEFINE_VERSION(3, 2, 2))
|
|
||||||
// splitting won't be fully functional until 3.2.2 (see TextElement::pageSplit())
|
|
||||||
// hack: prevent newlines at the end of the book possibly creating unnecessary pages
|
|
||||||
if (event == BookTextParser::Event_EOF)
|
|
||||||
{
|
|
||||||
while (plainText.size() && plainText[plainText.size()-1] == '\n')
|
|
||||||
plainText.erase(plainText.end()-1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!plainText.empty() || brBeforeLastTag || isPrevImg)
|
if (!plainText.empty() || brBeforeLastTag || isPrevImg)
|
||||||
{
|
{
|
||||||
TextElement elem(paper, pag, mBlockStyle,
|
TextElement elem(paper, pag, mBlockStyle,
|
||||||
@ -443,8 +433,6 @@ namespace MWGui
|
|||||||
int ret = mPaginator.getCurrentTop() + lastLine * lineHeight;
|
int ret = mPaginator.getCurrentTop() + lastLine * lineHeight;
|
||||||
|
|
||||||
// first empty lines that would go to the next page should be ignored
|
// first empty lines that would go to the next page should be ignored
|
||||||
// unfortunately, getLineInfo method won't be available until 3.2.2
|
|
||||||
#if (MYGUI_VERSION >= MYGUI_DEFINE_VERSION(3, 2, 2))
|
|
||||||
mPaginator.setIgnoreLeadingEmptyLines(true);
|
mPaginator.setIgnoreLeadingEmptyLines(true);
|
||||||
|
|
||||||
const MyGUI::VectorLineInfo & lines = mEditBox->getSubWidgetText()->castType<MyGUI::EditText>()->getLineInfo();
|
const MyGUI::VectorLineInfo & lines = mEditBox->getSubWidgetText()->castType<MyGUI::EditText>()->getLineInfo();
|
||||||
@ -458,7 +446,6 @@ namespace MWGui
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -535,9 +535,7 @@ namespace MWGui
|
|||||||
, mRepeatStepTime(0.1f)
|
, mRepeatStepTime(0.1f)
|
||||||
, mIsIncreasing(true)
|
, mIsIncreasing(true)
|
||||||
{
|
{
|
||||||
#if MYGUI_VERSION >= MYGUI_DEFINE_VERSION(3,2,2)
|
|
||||||
ScrollBar::setRepeatEnabled(false);
|
ScrollBar::setRepeatEnabled(false);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MWScrollBar::~MWScrollBar()
|
MWScrollBar::~MWScrollBar()
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include "box.hpp"
|
#include "box.hpp"
|
||||||
|
|
||||||
#if (MYGUI_VERSION >= MYGUI_DEFINE_VERSION(3, 2, 2))
|
|
||||||
#include <MyGUI_EditText.h>
|
#include <MyGUI_EditText.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Gui
|
namespace Gui
|
||||||
{
|
{
|
||||||
@ -59,10 +57,8 @@ namespace Gui
|
|||||||
int AutoSizedEditBox::getWidth()
|
int AutoSizedEditBox::getWidth()
|
||||||
{
|
{
|
||||||
// If the widget has the one short text line, we can shrink widget to avoid a lot of empty space.
|
// If the widget has the one short text line, we can shrink widget to avoid a lot of empty space.
|
||||||
// Unfortunately, getLineInfo method is available since MyGUI 3.2.2, so with older MyGUI versions tooltips will just have the fixed width.
|
|
||||||
int textWidth = mMaxWidth;
|
int textWidth = mMaxWidth;
|
||||||
|
|
||||||
#if (MYGUI_VERSION >= MYGUI_DEFINE_VERSION(3, 2, 2))
|
|
||||||
if (mShrink)
|
if (mShrink)
|
||||||
{
|
{
|
||||||
// MyGUI needs to know the widget size for wordwrapping, but we will know the widget size only after wordwrapping.
|
// MyGUI needs to know the widget size for wordwrapping, but we will know the widget size only after wordwrapping.
|
||||||
@ -81,7 +77,6 @@ namespace Gui
|
|||||||
mWasResized = true;
|
mWasResized = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return textWidth;
|
return textWidth;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user