Add missing status report for some toggle commands

deque
scrawl 11 years ago
parent 868e38a07c
commit 028e00c98f

@ -193,9 +193,9 @@ namespace MWBase
virtual void setDragDrop(bool dragDrop) = 0;
virtual bool getWorldMouseOver() = 0;
virtual void toggleFogOfWar() = 0;
virtual bool toggleFogOfWar() = 0;
virtual void toggleFullHelp() = 0;
virtual bool toggleFullHelp() = 0;
///< show extra info in item tooltips (owner, script)
virtual bool getFullHelp() const = 0;

@ -126,7 +126,7 @@ namespace MWBase
virtual void setWaterHeight(const float height) = 0;
virtual void toggleWater() = 0;
virtual bool toggleWater() = 0;
virtual void adjustSky() = 0;

@ -89,10 +89,11 @@ namespace MWGui
mChanged = true;
}
void LocalMapBase::toggleFogOfWar()
bool LocalMapBase::toggleFogOfWar()
{
mFogOfWar = !mFogOfWar;
applyFogOfWar();
return mFogOfWar;
}
void LocalMapBase::applyFogOfWar()

@ -35,7 +35,7 @@ namespace MWGui
void setPlayerDir(const float x, const float y);
void setPlayerPos(const float x, const float y);
void toggleFogOfWar();
bool toggleFogOfWar();
struct MarkerPosition
{

@ -547,9 +547,10 @@ namespace MWGui
return " (" + boost::lexical_cast<std::string>(value) + ")";
}
void ToolTips::toggleFullHelp()
bool ToolTips::toggleFullHelp()
{
mFullHelp = !mFullHelp;
return mFullHelp;
}
bool ToolTips::getFullHelp() const

@ -45,7 +45,7 @@ namespace MWGui
void setEnabled(bool enabled);
void toggleFullHelp(); ///< show extra info in item tooltips (owner, script)
bool toggleFullHelp(); ///< show extra info in item tooltips (owner, script)
bool getFullHelp() const;
void setDelay(float delay);

@ -814,10 +814,10 @@ namespace MWGui
mHud->setMinimapVisible (visible);
}
void WindowManager::toggleFogOfWar()
bool WindowManager::toggleFogOfWar()
{
mMap->toggleFogOfWar();
mHud->toggleFogOfWar();
return mHud->toggleFogOfWar();
}
void WindowManager::setFocusObject(const MWWorld::Ptr& focus)
@ -830,9 +830,9 @@ namespace MWGui
mToolTips->setFocusObjectScreenCoords(min_x, min_y, max_x, max_y);
}
void WindowManager::toggleFullHelp()
bool WindowManager::toggleFullHelp()
{
mToolTips->toggleFullHelp();
return mToolTips->toggleFullHelp();
}
bool WindowManager::getFullHelp() const

@ -188,8 +188,8 @@ namespace MWGui
virtual void setDragDrop(bool dragDrop);
virtual bool getWorldMouseOver();
virtual void toggleFogOfWar();
virtual void toggleFullHelp(); ///< show extra info in item tooltips (owner, script)
virtual bool toggleFogOfWar();
virtual bool toggleFullHelp(); ///< show extra info in item tooltips (owner, script)
virtual bool getFullHelp() const;
virtual void setActiveMap(int x, int y, bool interior);

@ -234,9 +234,9 @@ void RenderingManager::removeWater ()
mWater->setActive(false);
}
void RenderingManager::toggleWater()
bool RenderingManager::toggleWater()
{
mWater->toggle();
return mWater->toggle();
}
void RenderingManager::cellAdded (MWWorld::CellStore *store)

@ -127,7 +127,7 @@ public:
void rotateObject (const MWWorld::Ptr& ptr);
void setWaterHeight(const float height);
void toggleWater();
bool toggleWater();
/// Updates object rendering after cell change
/// \param old Object reference in previous cell

@ -326,10 +326,11 @@ void Water::setHeight(const float height)
sh::Factory::getInstance ().setSharedParameter ("waterLevel", sh::makeProperty<sh::FloatValue>(new sh::FloatValue(height)));
}
void Water::toggle()
bool Water::toggle()
{
mToggled = !mToggled;
updateVisible();
return mToggled;
}
void

@ -150,7 +150,7 @@ namespace MWRender {
void setActive(bool active);
void toggle();
bool toggle();
void update(float dt, Ogre::Vector3 player);
void frameStarted(float dt);

@ -92,7 +92,8 @@ namespace MWScript
virtual void execute (Interpreter::Runtime& runtime)
{
MWBase::Environment::get().getWindowManager()->toggleFogOfWar();
runtime.getContext().report(MWBase::Environment::get().getWindowManager()->toggleFogOfWar() ? "Fog of war -> On"
: "Fog of war -> Off");
}
};
@ -102,7 +103,8 @@ namespace MWScript
virtual void execute (Interpreter::Runtime& runtime)
{
MWBase::Environment::get().getWindowManager()->toggleFullHelp();
runtime.getContext().report(MWBase::Environment::get().getWindowManager()->toggleFullHelp() ? "Full help -> On"
: "Full help -> Off");
}
};

@ -275,7 +275,8 @@ namespace MWScript
virtual void execute (Interpreter::Runtime& runtime)
{
MWBase::Environment::get().getWorld()->toggleWater();
runtime.getContext().report(MWBase::Environment::get().getWorld()->toggleWater() ? "Water -> On"
: "Water -> Off");
}
};

@ -1553,9 +1553,9 @@ namespace MWWorld
mRendering->setWaterHeight(height);
}
void World::toggleWater()
bool World::toggleWater()
{
mRendering->toggleWater();
return mRendering->toggleWater();
}
void World::PCDropped (const Ptr& item)

@ -213,7 +213,7 @@ namespace MWWorld
virtual void setWaterHeight(const float height);
virtual void toggleWater();
virtual bool toggleWater();
virtual void adjustSky();

Loading…
Cancel
Save