mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
videos
This commit is contained in:
BIN
Mods/vcmi/Video/tutorial/AbortSpell.webm
Normal file
BIN
Mods/vcmi/Video/tutorial/AbortSpell.webm
Normal file
Binary file not shown.
BIN
Mods/vcmi/Video/tutorial/BattleDirection.webm
Normal file
BIN
Mods/vcmi/Video/tutorial/BattleDirection.webm
Normal file
Binary file not shown.
BIN
Mods/vcmi/Video/tutorial/BattleDirectionAbort.webm
Normal file
BIN
Mods/vcmi/Video/tutorial/BattleDirectionAbort.webm
Normal file
Binary file not shown.
BIN
Mods/vcmi/Video/tutorial/MapPanning.webm
Normal file
BIN
Mods/vcmi/Video/tutorial/MapPanning.webm
Normal file
Binary file not shown.
BIN
Mods/vcmi/Video/tutorial/MapZooming.webm
Normal file
BIN
Mods/vcmi/Video/tutorial/MapZooming.webm
Normal file
Binary file not shown.
BIN
Mods/vcmi/Video/tutorial/RightClick.webm
Normal file
BIN
Mods/vcmi/Video/tutorial/RightClick.webm
Normal file
Binary file not shown.
@@ -14,6 +14,8 @@
|
|||||||
#include "../../lib/CConfigHandler.h"
|
#include "../../lib/CConfigHandler.h"
|
||||||
#include "../../lib/CondSh.h"
|
#include "../../lib/CondSh.h"
|
||||||
#include "../CPlayerInterface.h"
|
#include "../CPlayerInterface.h"
|
||||||
|
#include "../CGameInfo.h"
|
||||||
|
#include "../CVideoHandler.h"
|
||||||
|
|
||||||
#include "../gui/CGuiHandler.h"
|
#include "../gui/CGuiHandler.h"
|
||||||
#include "../gui/Shortcut.h"
|
#include "../gui/Shortcut.h"
|
||||||
@@ -21,6 +23,7 @@
|
|||||||
#include "../widgets/Images.h"
|
#include "../widgets/Images.h"
|
||||||
#include "../widgets/Buttons.h"
|
#include "../widgets/Buttons.h"
|
||||||
#include "../widgets/TextControls.h"
|
#include "../widgets/TextControls.h"
|
||||||
|
#include "../render/Canvas.h"
|
||||||
|
|
||||||
CTutorialWindow::CTutorialWindow(const TutorialMode & m)
|
CTutorialWindow::CTutorialWindow(const TutorialMode & m)
|
||||||
: CWindowObject(BORDERED, ImagePath::builtin("DIBOXBCK")), mode { m }
|
: CWindowObject(BORDERED, ImagePath::builtin("DIBOXBCK")), mode { m }
|
||||||
@@ -76,3 +79,29 @@ void CTutorialWindow::previous()
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CTutorialWindow::show(Canvas & to)
|
||||||
|
{
|
||||||
|
CCS->videoh->update(pos.x + 200, pos.y + 200, to.getInternalSurface(), true, false,
|
||||||
|
[&]()
|
||||||
|
{
|
||||||
|
CCS->videoh->close();
|
||||||
|
CCS->videoh->open(VideoPath::builtin(video));
|
||||||
|
});
|
||||||
|
redraw();
|
||||||
|
|
||||||
|
CIntObject::show(to);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CTutorialWindow::activate()
|
||||||
|
{
|
||||||
|
video = "tutorial/BattleDirection";
|
||||||
|
|
||||||
|
CCS->videoh->open(VideoPath::builtin(video));
|
||||||
|
CIntObject::activate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CTutorialWindow::deactivate()
|
||||||
|
{
|
||||||
|
CCS->videoh->close();
|
||||||
|
}
|
||||||
@@ -34,6 +34,8 @@ class CTutorialWindow : public CWindowObject
|
|||||||
std::shared_ptr<CLabel> labelTitle;
|
std::shared_ptr<CLabel> labelTitle;
|
||||||
std::shared_ptr<CMultiLineLabel> labelInformation;
|
std::shared_ptr<CMultiLineLabel> labelInformation;
|
||||||
|
|
||||||
|
std::string video;
|
||||||
|
|
||||||
void close();
|
void close();
|
||||||
void next();
|
void next();
|
||||||
void previous();
|
void previous();
|
||||||
@@ -41,4 +43,8 @@ class CTutorialWindow : public CWindowObject
|
|||||||
public:
|
public:
|
||||||
CTutorialWindow(const TutorialMode & m);
|
CTutorialWindow(const TutorialMode & m);
|
||||||
static void openWindowFirstTime(const TutorialMode & m);
|
static void openWindowFirstTime(const TutorialMode & m);
|
||||||
|
|
||||||
|
void show(Canvas & to) override;
|
||||||
|
void activate() override;
|
||||||
|
void deactivate() override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ EResType EResTypeHelper::getTypeFromExtension(std::string extension)
|
|||||||
{".MJPG", EResType::VIDEO},
|
{".MJPG", EResType::VIDEO},
|
||||||
{".MPG", EResType::VIDEO},
|
{".MPG", EResType::VIDEO},
|
||||||
{".AVI", EResType::VIDEO},
|
{".AVI", EResType::VIDEO},
|
||||||
|
{".WEBM", EResType::VIDEO},
|
||||||
{".ZIP", EResType::ARCHIVE_ZIP},
|
{".ZIP", EResType::ARCHIVE_ZIP},
|
||||||
{".LOD", EResType::ARCHIVE_LOD},
|
{".LOD", EResType::ARCHIVE_LOD},
|
||||||
{".PAC", EResType::ARCHIVE_LOD},
|
{".PAC", EResType::ARCHIVE_LOD},
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class JsonSerializeFormat;
|
|||||||
* Font: .fnt
|
* Font: .fnt
|
||||||
* Image: .bmp, .jpg, .pcx, .png, .tga
|
* Image: .bmp, .jpg, .pcx, .png, .tga
|
||||||
* Sound: .wav .82m
|
* Sound: .wav .82m
|
||||||
* Video: .smk, .bik .mjpg .mpg
|
* Video: .smk, .bik .mjpg .mpg .webm
|
||||||
* Music: .mp3, .ogg
|
* Music: .mp3, .ogg
|
||||||
* Archive: .lod, .snd, .vid .pac .zip
|
* Archive: .lod, .snd, .vid .pac .zip
|
||||||
* Palette: .pal
|
* Palette: .pal
|
||||||
|
|||||||
Reference in New Issue
Block a user