Merge branch 'master' into memory

actorid
scrawl 12 years ago
commit 062ff189a2

@ -201,6 +201,8 @@ namespace MWBase
///< Hides dialog and schedules dialog to be deleted. ///< 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 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 void enterPressed () = 0;
virtual int readPressedButton() = 0; virtual int readPressedButton() = 0;

@ -22,6 +22,7 @@ namespace MWGui
, mLastRenderTime(0.f) , mLastRenderTime(0.f)
, mLastWallpaperChangeTime(0.f) , mLastWallpaperChangeTime(0.f)
, mFirstLoad(true) , mFirstLoad(true)
, mTotalRefsLoading(0)
{ {
getWidget(mLoadingText, "LoadingText"); getWidget(mLoadingText, "LoadingText");
getWidget(mProgressBar, "ProgressBar"); getWidget(mProgressBar, "ProgressBar");

@ -13,6 +13,7 @@ namespace MWGui
// defines // defines
mMessageBoxSpeed = 0.1; mMessageBoxSpeed = 0.1;
mInterMessageBoxe = NULL; mInterMessageBoxe = NULL;
mStaticMessageBox = NULL;
} }
void MessageBoxManager::onFrame (float frameDuration) void MessageBoxManager::onFrame (float frameDuration)
@ -68,10 +69,13 @@ namespace MWGui
} }
} }
void MessageBoxManager::createMessageBox (const std::string& message) void MessageBoxManager::createMessageBox (const std::string& message, bool stat)
{ {
MessageBox *box = new MessageBox(*this, message); MessageBox *box = new MessageBox(*this, message);
if(stat)
mStaticMessageBox = box;
else
removeMessageBox(message.length()*mMessageBoxSpeed, box); removeMessageBox(message.length()*mMessageBoxSpeed, box);
mMessageBoxes.push_back(box); mMessageBoxes.push_back(box);
@ -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) bool MessageBoxManager::createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons)
{ {
if(mInterMessageBoxe != NULL) { if(mInterMessageBoxe != NULL) {

@ -31,7 +31,8 @@ namespace MWGui
public: public:
MessageBoxManager (); MessageBoxManager ();
void onFrame (float frameDuration); 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 createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons);
bool isInteractiveMessageBox (); bool isInteractiveMessageBox ();
@ -52,6 +53,7 @@ namespace MWGui
private: private:
std::vector<MessageBox*> mMessageBoxes; std::vector<MessageBox*> mMessageBoxes;
InteractiveMessageBox* mInterMessageBoxe; InteractiveMessageBox* mInterMessageBoxe;
MessageBox* mStaticMessageBox;
std::vector<MessageBoxManagerTimer> mTimers; std::vector<MessageBoxManagerTimer> mTimers;
float mMessageBoxSpeed; float mMessageBoxSpeed;
}; };

@ -551,6 +551,8 @@ namespace MWGui
while (mControlsBox->getChildCount()) while (mControlsBox->getChildCount())
MyGUI::Gui::getInstance().destroyWidget(mControlsBox->getChildAt(0)); MyGUI::Gui::getInstance().destroyWidget(mControlsBox->getChildAt(0));
MWBase::Environment::get().getWindowManager ()->removeStaticMessageBox();
std::vector<int> actions = MWBase::Environment::get().getInputManager()->getActionSorting (); std::vector<int> actions = MWBase::Environment::get().getInputManager()->getActionSorting ();
const int h = 18; const int h = 18;
@ -585,7 +587,7 @@ namespace MWGui
static_cast<MyGUI::Button*>(_sender)->setCaptionWithReplacing("#{sNone}"); 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().getWindowManager ()->disallowMouse();
MWBase::Environment::get().getInputManager ()->enableDetectingBindingMode (actionId); 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 () void WindowManager::enterPressed ()
{ {
mMessageBoxManager->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 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 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 void enterPressed ();
virtual int readPressedButton (); ///< returns the index of the pressed button or -1 if no button was pressed (->MessageBoxmanager->InteractiveMessageBox) 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 void InputManager::keyBindingDetected(ICS::InputControlSystem* ICS, ICS::Control* control
, OIS::KeyCode key, ICS::Control::ControlChangingDirection direction) , 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); clearAllBindings(control);
ICS::DetectingBindingListener::keyBindingDetected (ICS, control, key, direction); ICS::DetectingBindingListener::keyBindingDetected (ICS, control, key, direction);
MWBase::Environment::get().getWindowManager ()->notifyInputActionBound (); MWBase::Environment::get().getWindowManager ()->notifyInputActionBound ();

@ -48,7 +48,7 @@ namespace MWMechanics
{ {
int sideX = sgn(actor.getCell()->mCell->mData.mX - player.getCell()->mCell->mData.mX); 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. //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; MWWorld::Class::get(actor).getMovementSettings(actor).mPosition[1] = 0;
return true; return true;
@ -58,7 +58,7 @@ namespace MWMechanics
{ {
int sideY = sgn(actor.getCell()->mCell->mData.mY - player.getCell()->mCell->mData.mY); 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. //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; MWWorld::Class::get(actor).getMovementSettings(actor).mPosition[1] = 0;
return true; 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) 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) if(!mAnimation)
return; return;

@ -49,6 +49,7 @@ namespace MWRender
TerrainMaterial::Profile::Profile(Ogre::TerrainMaterialGenerator* parent, const Ogre::String& name, const Ogre::String& desc) TerrainMaterial::Profile::Profile(Ogre::TerrainMaterialGenerator* parent, const Ogre::String& name, const Ogre::String& desc)
: Ogre::TerrainMaterialGenerator::Profile(parent, name, desc) : Ogre::TerrainMaterialGenerator::Profile(parent, name, desc)
, mGlobalColourMap(false) , mGlobalColourMap(false)
, mMaterial(0)
{ {
} }

@ -41,7 +41,9 @@ namespace MWRender {
{ {
public: public:
Reflection(Ogre::SceneManager* sceneManager) Reflection(Ogre::SceneManager* sceneManager)
: mSceneMgr(sceneManager) {} : mSceneMgr(sceneManager)
, mIsUnderwater(false)
{}
virtual ~Reflection() {} virtual ~Reflection() {}
virtual void setHeight (float height) {} virtual void setHeight (float height) {}

@ -141,7 +141,7 @@ namespace Compiler
if (mState==SetMemberVarState) if (mState==SetMemberVarState)
{ {
mMemberName = Misc::StringUtils::lowerCase (name); mMemberName = name;
char type = getContext().getMemberType (mMemberName, mName); char type = getContext().getMemberType (mMemberName, mName);
if (type!=' ') if (type!=' ')

@ -52,6 +52,7 @@ Paul McElroy (Greendogo)
Pieter van der Kloet (pvdk) Pieter van der Kloet (pvdk)
Radu-Marius Popovici (rpopovici) Radu-Marius Popovici (rpopovici)
Roman Melnik (Kromgart) Roman Melnik (Kromgart)
Roman Proskuryakov (humbug)
Sandy Carter (bwrsandman) Sandy Carter (bwrsandman)
Sebastian Wick (swick) Sebastian Wick (swick)
Sergey Shambir Sergey Shambir

@ -1266,9 +1266,9 @@ void TiXmlAttribute::SetDoubleValue( double _value )
{ {
char buf [256]; char buf [256];
#if defined(TIXML_SNPRINTF) #if defined(TIXML_SNPRINTF)
TIXML_SNPRINTF( buf, sizeof(buf), "%lf", _value); TIXML_SNPRINTF( buf, sizeof(buf), "%f", _value);
#else #else
sprintf (buf, "%lf", _value); sprintf (buf, "%f", _value);
#endif #endif
SetValue (buf); SetValue (buf);
} }

@ -16,7 +16,7 @@
<Property key="Caption" value="#{sTransparency_Menu}"/> <Property key="Caption" value="#{sTransparency_Menu}"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 28 352 18" align="Left Top" name="MenuTransparencySlider"> <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>
<Widget type="TextBox" skin="SandText" position="4 52 352 18" align="Left Top"> <Widget type="TextBox" skin="SandText" position="4 52 352 18" align="Left Top">
<Property key="Caption" value="#{sFull}"/> <Property key="Caption" value="#{sFull}"/>
@ -31,7 +31,7 @@
<Property key="Caption" value="#{sMenu_Help_Delay}"/> <Property key="Caption" value="#{sMenu_Help_Delay}"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 102 352 18" align="Left Top" name="ToolTipDelaySlider"> <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>
<Widget type="TextBox" skin="SandText" position="4 126 352 18" align="Left Top"> <Widget type="TextBox" skin="SandText" position="4 126 352 18" align="Left Top">
<Property key="Caption" value="#{sFast}"/> <Property key="Caption" value="#{sFast}"/>
@ -65,35 +65,35 @@
<Property key="Caption" value="#{sMaster}"/> <Property key="Caption" value="#{sMaster}"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 28 352 18" align="Left Top" name="MasterVolume"> <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>
<Widget type="TextBox" skin="NormalText" position="4 54 352 18" align="Left Top"> <Widget type="TextBox" skin="NormalText" position="4 54 352 18" align="Left Top">
<Property key="Caption" value="#{sVoice}"/> <Property key="Caption" value="#{sVoice}"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 78 352 18" align="Left Top" name="VoiceVolume"> <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>
<Widget type="TextBox" skin="NormalText" position="4 104 352 18" align="Left Top"> <Widget type="TextBox" skin="NormalText" position="4 104 352 18" align="Left Top">
<Property key="Caption" value="#{sEffects}"/> <Property key="Caption" value="#{sEffects}"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 128 352 18" align="Left Top" name="EffectsVolume"> <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>
<Widget type="TextBox" skin="NormalText" position="4 154 352 18" align="Left Top"> <Widget type="TextBox" skin="NormalText" position="4 154 352 18" align="Left Top">
<Property key="Caption" value="#{sFootsteps}"/> <Property key="Caption" value="#{sFootsteps}"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 178 352 18" align="Left Top" name="FootstepsVolume"> <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>
<Widget type="TextBox" skin="NormalText" position="4 204 352 18" align="Left Top"> <Widget type="TextBox" skin="NormalText" position="4 204 352 18" align="Left Top">
<Property key="Caption" value="#{sMusic}"/> <Property key="Caption" value="#{sMusic}"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 228 352 18" align="Left Top" name="MusicVolume"> <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> </Widget>
<Widget type="TabItem" skin="" position="4 28 360 312"> <Widget type="TabItem" skin="" position="4 28 360 312">
@ -118,7 +118,7 @@
<Property key="Caption" value="UI cursor sensitivity"/> <Property key="Caption" value="UI cursor sensitivity"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 252 160 18" align="Left Top" name="UISensitivitySlider"> <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>
<Widget type="TextBox" skin="SandText" position="4 276 160 18" align="Left Top"> <Widget type="TextBox" skin="SandText" position="4 276 160 18" align="Left Top">
<Property key="Caption" value="#{sLow}"/> <Property key="Caption" value="#{sLow}"/>
@ -134,7 +134,7 @@
<Property key="Caption" value="Camera sensitivity"/> <Property key="Caption" value="Camera sensitivity"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="180 252 160 18" align="Left Top" name="CameraSensitivitySlider"> <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>
<Widget type="TextBox" skin="SandText" position="180 276 160 18" align="Left Top"> <Widget type="TextBox" skin="SandText" position="180 276 160 18" align="Left Top">
<Property key="Caption" value="#{sLow}"/> <Property key="Caption" value="#{sLow}"/>
@ -199,7 +199,7 @@
<Property key="Caption" value="Field of View"/> <Property key="Caption" value="Field of View"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 222 329 18" align="Left Top" name="FOVSlider"> <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>
<Widget type="TextBox" skin="SandText" position="4 246 329 18" align="Left Top"> <Widget type="TextBox" skin="SandText" position="4 246 329 18" align="Left Top">
<Property key="Caption" value="#{sLow}"/> <Property key="Caption" value="#{sLow}"/>
@ -224,7 +224,7 @@
<Property key="Caption" value="Anisotropy"/> <Property key="Caption" value="Anisotropy"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="0 28 150 18" align="Left Top" name="AnisotropySlider"> <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>
</Widget> </Widget>
@ -232,7 +232,7 @@
<Property key="Caption" value="#{sRender_Distance}"/> <Property key="Caption" value="#{sRender_Distance}"/>
</Widget> </Widget>
<Widget type="ScrollBar" skin="MW_HScroll" position="4 154 322 18" align="Left Top" name="ViewDistanceSlider"> <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>
<Widget type="TextBox" skin="SandText" position="4 178 332 18" align="Left Top"> <Widget type="TextBox" skin="SandText" position="4 178 332 18" align="Left Top">
<Property key="Caption" value="#{sNear}"/> <Property key="Caption" value="#{sNear}"/>

Loading…
Cancel
Save