From 145d01d3df58cba497a86308f3125cfe1ebe6516 Mon Sep 17 00:00:00 2001 From: pelya Date: Sun, 6 Dec 2015 19:00:15 +0200 Subject: [PATCH] Railroad tutorial, by Deliso Jan --- src/tutorial_gui.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tutorial_gui.cpp b/src/tutorial_gui.cpp index bbaadba7fb..2b913a1158 100644 --- a/src/tutorial_gui.cpp +++ b/src/tutorial_gui.cpp @@ -49,6 +49,12 @@ static VideoLink_t busTutorial[] = { { NULL, NULL } }; +static VideoLink_t trainTutorial[] = { + { "en", "https://www.youtube.com/watch?v=VdMdL2qyZ6s" }, + { ANY_LANG, "https://www.youtube.com/watch?v=VdMdL2qyZ6s" }, + { NULL, NULL } +}; + void OpenExternTutorialVideo(VideoLink_t *tutorial) { const char *link = NULL; @@ -131,7 +137,6 @@ struct TutorialWindow : public Window { { this->InitNested(WN_GAME_OPTIONS_ABOUT); this->SetWidgetDisabledState(WID_STL_TRUCK, true); - this->SetWidgetDisabledState(WID_STL_TRAIN, true); this->SetWidgetDisabledState(WID_STL_SHIP, true); this->SetWidgetDisabledState(WID_STL_AIRPLANE, true); this->SetWidgetDisabledState(WID_STL_FACILALL, true); @@ -152,6 +157,7 @@ struct TutorialWindow : public Window { case WID_STL_TRUCK: break; case WID_STL_TRAIN: + video = trainTutorial; break; case WID_STL_SHIP: break; @@ -193,7 +199,7 @@ void ShowTutorialWindow() void ShowTutorialWindowOnceAfterInstall() { - static const char * TUTORIAL_SHOWN_FLAG = ".tutorial-shown-1.flag"; + static const char * TUTORIAL_SHOWN_FLAG = ".tutorial-shown-2.flag"; FILE *ff = fopen(TUTORIAL_SHOWN_FLAG, "r"); if (ff) {