mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-18 13:12:50 +00:00
Merge branch 'master' into memory
This commit is contained in:
commit
062ff189a2
@ -201,6 +201,8 @@ namespace MWBase
|
||||
///< Hides dialog and schedules dialog to be deleted.
|
||||
|
||||
virtual void messageBox (const std::string& message, const std::vector<std::string>& buttons = std::vector<std::string>()) = 0;
|
||||
virtual void staticMessageBox(const std::string& message) = 0;
|
||||
virtual void removeStaticMessageBox() = 0;
|
||||
|
||||
virtual void enterPressed () = 0;
|
||||
virtual int readPressedButton() = 0;
|
||||
|
@ -22,6 +22,7 @@ namespace MWGui
|
||||
, mLastRenderTime(0.f)
|
||||
, mLastWallpaperChangeTime(0.f)
|
||||
, mFirstLoad(true)
|
||||
, mTotalRefsLoading(0)
|
||||
{
|
||||
getWidget(mLoadingText, "LoadingText");
|
||||
getWidget(mProgressBar, "ProgressBar");
|
||||
|
@ -13,6 +13,7 @@ namespace MWGui
|
||||
// defines
|
||||
mMessageBoxSpeed = 0.1;
|
||||
mInterMessageBoxe = NULL;
|
||||
mStaticMessageBox = NULL;
|
||||
}
|
||||
|
||||
void MessageBoxManager::onFrame (float frameDuration)
|
||||
@ -68,11 +69,14 @@ namespace MWGui
|
||||
}
|
||||
}
|
||||
|
||||
void MessageBoxManager::createMessageBox (const std::string& message)
|
||||
void MessageBoxManager::createMessageBox (const std::string& message, bool stat)
|
||||
{
|
||||
MessageBox *box = new MessageBox(*this, message);
|
||||
|
||||
removeMessageBox(message.length()*mMessageBoxSpeed, box);
|
||||
if(stat)
|
||||
mStaticMessageBox = box;
|
||||
else
|
||||
removeMessageBox(message.length()*mMessageBoxSpeed, box);
|
||||
|
||||
mMessageBoxes.push_back(box);
|
||||
std::vector<MessageBox*>::iterator it;
|
||||
@ -90,6 +94,12 @@ namespace MWGui
|
||||
}
|
||||
}
|
||||
|
||||
void MessageBoxManager::removeStaticMessageBox ()
|
||||
{
|
||||
removeMessageBox(mStaticMessageBox);
|
||||
mStaticMessageBox = NULL;
|
||||
}
|
||||
|
||||
bool MessageBoxManager::createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons)
|
||||
{
|
||||
if(mInterMessageBoxe != NULL) {
|
||||
|
@ -31,7 +31,8 @@ namespace MWGui
|
||||
public:
|
||||
MessageBoxManager ();
|
||||
void onFrame (float frameDuration);
|
||||
void createMessageBox (const std::string& message);
|
||||
void createMessageBox (const std::string& message, bool stat = false);
|
||||
void removeStaticMessageBox ();
|
||||
bool createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons);
|
||||
bool isInteractiveMessageBox ();
|
||||
|
||||
@ -52,6 +53,7 @@ namespace MWGui
|
||||
private:
|
||||
std::vector<MessageBox*> mMessageBoxes;
|
||||
InteractiveMessageBox* mInterMessageBoxe;
|
||||
MessageBox* mStaticMessageBox;
|
||||
std::vector<MessageBoxManagerTimer> mTimers;
|
||||
float mMessageBoxSpeed;
|
||||
};
|
||||
|
@ -551,6 +551,8 @@ namespace MWGui
|
||||
while (mControlsBox->getChildCount())
|
||||
MyGUI::Gui::getInstance().destroyWidget(mControlsBox->getChildAt(0));
|
||||
|
||||
MWBase::Environment::get().getWindowManager ()->removeStaticMessageBox();
|
||||
|
||||
std::vector<int> actions = MWBase::Environment::get().getInputManager()->getActionSorting ();
|
||||
|
||||
const int h = 18;
|
||||
@ -585,7 +587,7 @@ namespace MWGui
|
||||
|
||||
static_cast<MyGUI::Button*>(_sender)->setCaptionWithReplacing("#{sNone}");
|
||||
|
||||
MWBase::Environment::get().getWindowManager ()->messageBox ("#{sControlsMenu3}");
|
||||
MWBase::Environment::get().getWindowManager ()->staticMessageBox ("#{sControlsMenu3}");
|
||||
MWBase::Environment::get().getWindowManager ()->disallowMouse();
|
||||
|
||||
MWBase::Environment::get().getInputManager ()->enableDetectingBindingMode (actionId);
|
||||
|
@ -600,6 +600,16 @@ namespace MWGui
|
||||
}
|
||||
}
|
||||
|
||||
void WindowManager::staticMessageBox(const std::string& message)
|
||||
{
|
||||
mMessageBoxManager->createMessageBox(message, true);
|
||||
}
|
||||
|
||||
void WindowManager::removeStaticMessageBox()
|
||||
{
|
||||
mMessageBoxManager->removeStaticMessageBox();
|
||||
}
|
||||
|
||||
void WindowManager::enterPressed ()
|
||||
{
|
||||
mMessageBoxManager->enterPressed();
|
||||
|
@ -192,6 +192,8 @@ namespace MWGui
|
||||
virtual void removeDialog(OEngine::GUI::Layout* dialog); ///< Hides dialog and schedules dialog to be deleted.
|
||||
|
||||
virtual void messageBox (const std::string& message, const std::vector<std::string>& buttons = std::vector<std::string>());
|
||||
virtual void staticMessageBox(const std::string& message);
|
||||
virtual void removeStaticMessageBox();
|
||||
virtual void enterPressed ();
|
||||
virtual int readPressedButton (); ///< returns the index of the pressed button or -1 if no button was pressed (->MessageBoxmanager->InteractiveMessageBox)
|
||||
|
||||
|
@ -917,6 +917,10 @@ namespace MWInput
|
||||
void InputManager::keyBindingDetected(ICS::InputControlSystem* ICS, ICS::Control* control
|
||||
, OIS::KeyCode key, ICS::Control::ControlChangingDirection direction)
|
||||
{
|
||||
//Disallow binding escape key, and unassigned keys
|
||||
if(key==OIS::KC_ESCAPE || key==OIS::KC_UNASSIGNED)
|
||||
return
|
||||
|
||||
clearAllBindings(control);
|
||||
ICS::DetectingBindingListener::keyBindingDetected (ICS, control, key, direction);
|
||||
MWBase::Environment::get().getWindowManager ()->notifyInputActionBound ();
|
||||
|
@ -48,7 +48,7 @@ namespace MWMechanics
|
||||
{
|
||||
int sideX = sgn(actor.getCell()->mCell->mData.mX - player.getCell()->mCell->mData.mX);
|
||||
//check if actor is near the border of an inactive cell. If so, disable aitravel.
|
||||
if(sideX*(pos.pos[0] - actor.getCell()->mCell->mData.mX * ESM::Land::REAL_SIZE) > sideX*(ESM::Land::REAL_SIZE/2. - 2000))
|
||||
if(sideX*(pos.pos[0] - actor.getCell()->mCell->mData.mX * ESM::Land::REAL_SIZE) > sideX*(ESM::Land::REAL_SIZE/2. - 200))
|
||||
{
|
||||
MWWorld::Class::get(actor).getMovementSettings(actor).mPosition[1] = 0;
|
||||
return true;
|
||||
@ -58,7 +58,7 @@ namespace MWMechanics
|
||||
{
|
||||
int sideY = sgn(actor.getCell()->mCell->mData.mY - player.getCell()->mCell->mData.mY);
|
||||
//check if actor is near the border of an inactive cell. If so, disable aitravel.
|
||||
if(sideY*(pos.pos[1] - actor.getCell()->mCell->mData.mY * ESM::Land::REAL_SIZE) > sideY*(ESM::Land::REAL_SIZE/2. - 2000))
|
||||
if(sideY*(pos.pos[1] - actor.getCell()->mCell->mData.mY * ESM::Land::REAL_SIZE) > sideY*(ESM::Land::REAL_SIZE/2. - 200))
|
||||
{
|
||||
MWWorld::Class::get(actor).getMovementSettings(actor).mPosition[1] = 0;
|
||||
return true;
|
||||
|
@ -104,7 +104,14 @@ static void getStateInfo(CharacterState state, std::string *group)
|
||||
|
||||
|
||||
CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Animation *anim, CharacterState state, bool loop)
|
||||
: mPtr(ptr), mAnimation(anim), mCharState(state), mSkipAnim(false), mMovingAnim(false), mSecondsOfRunning(0), mSecondsOfSwimming(0)
|
||||
: mPtr(ptr)
|
||||
, mAnimation(anim)
|
||||
, mCharState(state)
|
||||
, mSkipAnim(false)
|
||||
, mMovingAnim(false)
|
||||
, mSecondsOfRunning(0)
|
||||
, mSecondsOfSwimming(0)
|
||||
, mLooping(false)
|
||||
{
|
||||
if(!mAnimation)
|
||||
return;
|
||||
|
@ -49,6 +49,7 @@ namespace MWRender
|
||||
TerrainMaterial::Profile::Profile(Ogre::TerrainMaterialGenerator* parent, const Ogre::String& name, const Ogre::String& desc)
|
||||
: Ogre::TerrainMaterialGenerator::Profile(parent, name, desc)
|
||||
, mGlobalColourMap(false)
|
||||
, mMaterial(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,9 @@ namespace MWRender {
|
||||
{
|
||||
public:
|
||||
Reflection(Ogre::SceneManager* sceneManager)
|
||||
: mSceneMgr(sceneManager) {}
|
||||
: mSceneMgr(sceneManager)
|
||||
, mIsUnderwater(false)
|
||||
{}
|
||||
virtual ~Reflection() {}
|
||||
|
||||
virtual void setHeight (float height) {}
|
||||
|
@ -141,7 +141,7 @@ namespace Compiler
|
||||
|
||||
if (mState==SetMemberVarState)
|
||||
{
|
||||
mMemberName = Misc::StringUtils::lowerCase (name);
|
||||
mMemberName = name;
|
||||
char type = getContext().getMemberType (mMemberName, mName);
|
||||
|
||||
if (type!=' ')
|
||||
|
@ -52,6 +52,7 @@ Paul McElroy (Greendogo)
|
||||
Pieter van der Kloet (pvdk)
|
||||
Radu-Marius Popovici (rpopovici)
|
||||
Roman Melnik (Kromgart)
|
||||
Roman Proskuryakov (humbug)
|
||||
Sandy Carter (bwrsandman)
|
||||
Sebastian Wick (swick)
|
||||
Sergey Shambir
|
||||
|
8
extern/oics/tinyxml.cpp
vendored
8
extern/oics/tinyxml.cpp
vendored
@ -706,9 +706,9 @@ void TiXmlElement::SetDoubleAttribute( const char * name, double val )
|
||||
{
|
||||
char buf[256];
|
||||
#if defined(TIXML_SNPRINTF)
|
||||
TIXML_SNPRINTF( buf, sizeof(buf), "%f", val );
|
||||
TIXML_SNPRINTF( buf, sizeof(buf), "%f", val );
|
||||
#else
|
||||
sprintf( buf, "%f", val );
|
||||
sprintf( buf, "%f", val );
|
||||
#endif
|
||||
SetAttribute( name, buf );
|
||||
}
|
||||
@ -1266,9 +1266,9 @@ void TiXmlAttribute::SetDoubleValue( double _value )
|
||||
{
|
||||
char buf [256];
|
||||
#if defined(TIXML_SNPRINTF)
|
||||
TIXML_SNPRINTF( buf, sizeof(buf), "%lf", _value);
|
||||
TIXML_SNPRINTF( buf, sizeof(buf), "%f", _value);
|
||||
#else
|
||||
sprintf (buf, "%lf", _value);
|
||||
sprintf (buf, "%f", _value);
|
||||
#endif
|
||||
SetValue (buf);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
<Property key="Caption" value="#{sTransparency_Menu}"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="4 28 352 18" align="Left Top" name="MenuTransparencySlider">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
<Widget type="TextBox" skin="SandText" position="4 52 352 18" align="Left Top">
|
||||
<Property key="Caption" value="#{sFull}"/>
|
||||
@ -31,7 +31,7 @@
|
||||
<Property key="Caption" value="#{sMenu_Help_Delay}"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="4 102 352 18" align="Left Top" name="ToolTipDelaySlider">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
<Widget type="TextBox" skin="SandText" position="4 126 352 18" align="Left Top">
|
||||
<Property key="Caption" value="#{sFast}"/>
|
||||
@ -65,35 +65,35 @@
|
||||
<Property key="Caption" value="#{sMaster}"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="4 28 352 18" align="Left Top" name="MasterVolume">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="TextBox" skin="NormalText" position="4 54 352 18" align="Left Top">
|
||||
<Property key="Caption" value="#{sVoice}"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="4 78 352 18" align="Left Top" name="VoiceVolume">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="TextBox" skin="NormalText" position="4 104 352 18" align="Left Top">
|
||||
<Property key="Caption" value="#{sEffects}"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="4 128 352 18" align="Left Top" name="EffectsVolume">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="TextBox" skin="NormalText" position="4 154 352 18" align="Left Top">
|
||||
<Property key="Caption" value="#{sFootsteps}"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="4 178 352 18" align="Left Top" name="FootstepsVolume">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="TextBox" skin="NormalText" position="4 204 352 18" align="Left Top">
|
||||
<Property key="Caption" value="#{sMusic}"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="4 228 352 18" align="Left Top" name="MusicVolume">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
<Widget type="TabItem" skin="" position="4 28 360 312">
|
||||
@ -118,7 +118,7 @@
|
||||
<Property key="Caption" value="UI cursor sensitivity"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="4 252 160 18" align="Left Top" name="UISensitivitySlider">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
<Widget type="TextBox" skin="SandText" position="4 276 160 18" align="Left Top">
|
||||
<Property key="Caption" value="#{sLow}"/>
|
||||
@ -134,7 +134,7 @@
|
||||
<Property key="Caption" value="Camera sensitivity"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="180 252 160 18" align="Left Top" name="CameraSensitivitySlider">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
<Widget type="TextBox" skin="SandText" position="180 276 160 18" align="Left Top">
|
||||
<Property key="Caption" value="#{sLow}"/>
|
||||
@ -199,7 +199,7 @@
|
||||
<Property key="Caption" value="Field of View"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="4 222 329 18" align="Left Top" name="FOVSlider">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
<Widget type="TextBox" skin="SandText" position="4 246 329 18" align="Left Top">
|
||||
<Property key="Caption" value="#{sLow}"/>
|
||||
@ -224,7 +224,7 @@
|
||||
<Property key="Caption" value="Anisotropy"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="0 28 150 18" align="Left Top" name="AnisotropySlider">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
@ -232,7 +232,7 @@
|
||||
<Property key="Caption" value="#{sRender_Distance}"/>
|
||||
</Widget>
|
||||
<Widget type="ScrollBar" skin="MW_HScroll" position="4 154 322 18" align="Left Top" name="ViewDistanceSlider">
|
||||
<Property key="Range" value="1000000"/>
|
||||
<Property key="Range" value="100"/>
|
||||
</Widget>
|
||||
<Widget type="TextBox" skin="SandText" position="4 178 332 18" align="Left Top">
|
||||
<Property key="Caption" value="#{sNear}"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user