1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00
This commit is contained in:
Laserlicht
2023-11-14 22:39:11 +01:00
committed by GitHub
parent f7a31865f3
commit cb92778e00
2 changed files with 40 additions and 8 deletions

View File

@@ -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<CFilledTexture>(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<CButton>(Point(239, 367), AnimationPath::builtin("IOKAY"), CButton::tooltip(), std::bind(&CTutorialWindow::close, this), EShortcut::GLOBAL_ACCEPT); //62x28
buttonLeft = std::make_shared<CButton>(Point(5, 177), AnimationPath::builtin("HSBTNS3"), CButton::tooltip(), std::bind(&CTutorialWindow::previous, this), EShortcut::MOVE_LEFT); //22x46
buttonRight = std::make_shared<CButton>(Point(513, 177), AnimationPath::builtin("HSBTNS5"), CButton::tooltip(), std::bind(&CTutorialWindow::next, this), EShortcut::MOVE_RIGHT); //22x46
buttonRight->block(true);
labelTitle = std::make_shared<CLabel>(270, 15, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, "Touchscreen Intro");
labelInformation = std::make_shared<CMultiLineLabel>(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()
{
}