Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Codechange] Added missing notifications messages in the camera manager #654

Merged
merged 1 commit into from Jan 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 3 additions & 9 deletions source/main/gfx/camera/CameraBehaviorIsometric.cpp
Expand Up @@ -21,21 +21,15 @@ along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.

#include "Application.h"
#include "Console.h"
#include "Language.h"
#include "GUIManager.h"
#include "Language.h"

using namespace Ogre;

void CameraBehaviorIsometric::activate(const CameraManager::CameraContext &ctx, bool reset /* = true */)
{
#ifdef USE_MYGUI
RoR::Application::GetConsole()->putMessage(
RoR::Console::CONSOLE_MSGTYPE_INFO,
RoR::Console::CONSOLE_SYSTEM_NOTICE,
_L("fixed free camera"),
"camera_link.png",
3000
);
RoR::Application::GetGuiManager()->PushNotification("Notice:", _L("fixed free camera"));
RoR::Application::GetConsole()->putMessage(RoR::Console::CONSOLE_MSGTYPE_INFO, RoR::Console::CONSOLE_SYSTEM_NOTICE, _L("Fixed camera"), "camera_link.png", 3000);
RoR::Application::GetGuiManager()->PushNotification("Notice:", _L("Fixed camera"));
#endif // USE_MYGUI
}
7 changes: 5 additions & 2 deletions source/main/gfx/camera/CameraBehaviorOrbit.cpp
Expand Up @@ -26,6 +26,7 @@ along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
#include "BeamFactory.h"
#include "Collisions.h"
#include "Console.h"
#include "GUIManager.h"
#include "IHeightFinder.h"
#include "InputEngine.h"
#include "Language.h"
Expand Down Expand Up @@ -103,10 +104,12 @@ void CameraBehaviorOrbit::update(const CameraManager::CameraContext &ctx)
#ifdef USE_MYGUI
if ( limitMinCamDist )
{
RoR::Application::GetConsole()->putMessage(Console::CONSOLE_MSGTYPE_INFO, Console::CONSOLE_SYSTEM_NOTICE, _L("limited camera zoom enabled"), "camera_go.png", 3000);
RoR::Application::GetConsole()->putMessage(Console::CONSOLE_MSGTYPE_INFO, Console::CONSOLE_SYSTEM_NOTICE, _L("Limited camera zoom enabled"), "camera_go.png", 3000);
RoR::Application::GetGuiManager()->PushNotification("Notice:", _L("Limited camera zoom enabled"));
} else
{
RoR::Application::GetConsole()->putMessage(Console::CONSOLE_MSGTYPE_INFO, Console::CONSOLE_SYSTEM_NOTICE, _L("limited camera zoom disabled"), "camera_go.png", 3000);
RoR::Application::GetConsole()->putMessage(Console::CONSOLE_MSGTYPE_INFO, Console::CONSOLE_SYSTEM_NOTICE, _L("Limited camera zoom disabled"), "camera_go.png", 3000);
RoR::Application::GetGuiManager()->PushNotification("Notice:", _L("Limited camera zoom disabled"));
}
#endif // USE_MYGUI
}
Expand Down
7 changes: 5 additions & 2 deletions source/main/gfx/camera/CameraBehaviorVehicleSpline.cpp
Expand Up @@ -24,6 +24,7 @@ along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
#include "Application.h"
#include "Beam.h"
#include "Console.h"
#include "GUIManager.h"
#include "InputEngine.h"
#include "Language.h"
#include "Settings.h"
Expand Down Expand Up @@ -75,10 +76,12 @@ void CameraBehaviorVehicleSpline::update(const CameraManager::CameraContext &ctx
#ifdef USE_MYGUI
if ( autoTracking )
{
RoR::Application::GetConsole()->putMessage(Console::CONSOLE_MSGTYPE_INFO, Console::CONSOLE_SYSTEM_NOTICE, _L("auto tracking enabled"), "camera_go.png", 3000);
RoR::Application::GetConsole()->putMessage(Console::CONSOLE_MSGTYPE_INFO, Console::CONSOLE_SYSTEM_NOTICE, _L("Auto tracking enabled"), "camera_go.png", 3000);
RoR::Application::GetGuiManager()->PushNotification("Notice:", _L("Auto tracking enabled"));
} else
{
RoR::Application::GetConsole()->putMessage(Console::CONSOLE_MSGTYPE_INFO, Console::CONSOLE_SYSTEM_NOTICE, _L("auto tracking disabled"), "camera_go.png", 3000);
RoR::Application::GetConsole()->putMessage(Console::CONSOLE_MSGTYPE_INFO, Console::CONSOLE_SYSTEM_NOTICE, _L("Auto tracking disabled"), "camera_go.png", 3000);
RoR::Application::GetGuiManager()->PushNotification("Notice:", _L("Auto tracking disabled"));
}
#endif // USE_MYGUI
}
Expand Down