Skip to content

Commit

Permalink
replaced welcome message
Browse files Browse the repository at this point in the history
  • Loading branch information
tritonas00 committed Nov 7, 2021
1 parent e6baad6 commit 591e035
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion source/main/gui/panels/GUI_GameChatBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
#include "Console.h"
#include "GUIManager.h"
#include "Language.h"
#include "InputEngine.h"

#include <cstring> // strtok, strncmp
#include <fmt/format.h>
#include <imgui.h>
#include <regex>

using namespace RoR;
using namespace GUI;
Expand Down Expand Up @@ -75,7 +77,11 @@ void GameChatBox::Draw()

if (initialized == true)
{
App::GetConsole()->putMessage(Console::CONSOLE_MSGTYPE_INFO, Console::CONSOLE_SYSTEM_NOTICE, _LC("ChatBox", "Welcome to Rigs of Rods!"));
std::string shortcut = regex_replace(App::GetInputEngine()->getEventCommand(EV_COMMON_GET_NEW_VEHICLE).c_str(), std::regex("EXPL\\+"), "");
Str<100> msg;
msg << "Press " << shortcut << " to spawn a vehicle";

App::GetConsole()->putMessage(Console::CONSOLE_MSGTYPE_INFO, Console::CONSOLE_SYSTEM_NOTICE, _LC("ChatBox", msg), "lightbulb.png");
initialized = false;
}

Expand Down
1 change: 0 additions & 1 deletion source/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,6 @@ int main(int argc, char *argv[])
}
else if (App::sim_state->getEnum<SimState>() == SimState::RUNNING)
{

if (App::GetCameraManager()->GetCurrentBehavior() != CameraManager::CAMERA_BEHAVIOR_FREE)
{
App::GetGameContext()->UpdateSimInputEvents(dt);
Expand Down

0 comments on commit 591e035

Please # to comment.