diff --git a/client/windows/CTutorialWindow.cpp b/client/windows/CTutorialWindow.cpp index c176e93ac..9055919ba 100644 --- a/client/windows/CTutorialWindow.cpp +++ b/client/windows/CTutorialWindow.cpp @@ -16,15 +16,18 @@ #include "../CPlayerInterface.h" #include "../gui/CGuiHandler.h" +#include "../gui/Shortcut.h" #include "../gui/WindowHandler.h" #include "../widgets/Images.h" +#include "../widgets/Buttons.h" +#include "../widgets/TextControls.h" CTutorialWindow::CTutorialWindow(const TutorialMode & m) : CWindowObject(BORDERED, ImagePath::builtin("DIBOXBCK")), mode { m } { OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE; - pos = Rect(pos.x, pos.y, 480, 320); + pos = Rect(pos.x, pos.y, 540, 400); //video: 480x320 background = std::make_shared(ImagePath::builtin("DIBOXBCK"), Rect(0, 0, pos.w, pos.h)); updateShadow(); @@ -32,6 +35,14 @@ CTutorialWindow::CTutorialWindow(const TutorialMode & m) center(); addUsedEvents(LCLICK); + + buttonOk = std::make_shared(Point(239, 367), AnimationPath::builtin("IOKAY"), CButton::tooltip(), std::bind(&CTutorialWindow::close, this), EShortcut::GLOBAL_ACCEPT); //62x28 + buttonLeft = std::make_shared(Point(5, 177), AnimationPath::builtin("HSBTNS3"), CButton::tooltip(), std::bind(&CTutorialWindow::previous, this), EShortcut::MOVE_LEFT); //22x46 + buttonRight = std::make_shared(Point(513, 177), AnimationPath::builtin("HSBTNS5"), CButton::tooltip(), std::bind(&CTutorialWindow::next, this), EShortcut::MOVE_RIGHT); //22x46 + buttonRight->block(true); + + labelTitle = std::make_shared(270, 15, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, "Touchscreen Intro"); + labelInformation = std::make_shared(Rect(5, 50, 530, 60), EFonts::FONT_MEDIUM, ETextAlignment::CENTER, Colors::WHITE, "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua."); } void CTutorialWindow::openWindowFirstTime(const TutorialMode & m) @@ -47,10 +58,20 @@ void CTutorialWindow::openWindowFirstTime(const TutorialMode & m) } } -void CTutorialWindow::clickPressed(const Point & cursorPosition) +void CTutorialWindow::close() { - close(); - if(LOCPLINT) LOCPLINT->showingDialog->setn(false); + + WindowBase::close(); +} + +void CTutorialWindow::next() +{ + +} + +void CTutorialWindow::previous() +{ + } \ No newline at end of file diff --git a/client/windows/CTutorialWindow.h b/client/windows/CTutorialWindow.h index 9b4b8ddcc..afcc07e09 100644 --- a/client/windows/CTutorialWindow.h +++ b/client/windows/CTutorialWindow.h @@ -12,6 +12,9 @@ #include "../windows/CWindowObject.h" class CFilledTexture; +class CButton; +class CLabel; +class CMultiLineLabel; enum TutorialMode { @@ -24,10 +27,18 @@ class CTutorialWindow : public CWindowObject TutorialMode mode; std::shared_ptr background; + std::shared_ptr buttonOk; + std::shared_ptr buttonLeft; + std::shared_ptr buttonRight; + + std::shared_ptr labelTitle; + std::shared_ptr labelInformation; + + void close(); + void next(); + void previous(); + public: CTutorialWindow(const TutorialMode & m); - static void openWindowFirstTime(const TutorialMode & m); - - - void clickPressed(const Point & cursorPosition) override; + static void openWindowFirstTime(const TutorialMode & m); }; \ No newline at end of file