mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
window
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
#include "../lib/CConfigHandler.h"
|
#include "../lib/CConfigHandler.h"
|
||||||
#include "../lib/texts/CGeneralTextHandler.h"
|
#include "../lib/texts/CGeneralTextHandler.h"
|
||||||
#include "../lib/serializer/Connection.h"
|
#include "../lib/serializer/Connection.h"
|
||||||
|
#include "../lib/campaign/CampaignState.h"
|
||||||
|
|
||||||
void ApplyOnLobbyHandlerNetPackVisitor::visitLobbyClientConnected(LobbyClientConnected & pack)
|
void ApplyOnLobbyHandlerNetPackVisitor::visitLobbyClientConnected(LobbyClientConnected & pack)
|
||||||
{
|
{
|
||||||
@@ -203,7 +204,10 @@ void ApplyOnLobbyScreenNetPackVisitor::visitLobbyUpdateState(LobbyUpdateState &
|
|||||||
if(!lobby->bonusSel && handler.si->campState && handler.getState() == EClientState::LOBBY_CAMPAIGN)
|
if(!lobby->bonusSel && handler.si->campState && handler.getState() == EClientState::LOBBY_CAMPAIGN)
|
||||||
{
|
{
|
||||||
lobby->bonusSel = std::make_shared<CBonusSelection>();
|
lobby->bonusSel = std::make_shared<CBonusSelection>();
|
||||||
GH.windows().pushWindow(lobby->bonusSel);
|
if(!handler.si->campState->conqueredScenarios().size())
|
||||||
|
GH.windows().createAndPushWindow<CampaignIntroVideo>(VideoPath::builtin("Hc1_Intro"), ImagePath::builtin("INTRORIM"), lobby->bonusSel);
|
||||||
|
else
|
||||||
|
GH.windows().pushWindow(lobby->bonusSel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lobby->bonusSel)
|
if(lobby->bonusSel)
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include "../widgets/MiscWidgets.h"
|
#include "../widgets/MiscWidgets.h"
|
||||||
#include "../widgets/ObjectLists.h"
|
#include "../widgets/ObjectLists.h"
|
||||||
#include "../widgets/TextControls.h"
|
#include "../widgets/TextControls.h"
|
||||||
|
#include "../widgets/VideoWidget.h"
|
||||||
#include "../windows/GUIClasses.h"
|
#include "../windows/GUIClasses.h"
|
||||||
#include "../windows/InfoWindows.h"
|
#include "../windows/InfoWindows.h"
|
||||||
#include "../render/IImage.h"
|
#include "../render/IImage.h"
|
||||||
@@ -58,6 +59,20 @@
|
|||||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||||
|
|
||||||
|
|
||||||
|
CampaignIntroVideo::CampaignIntroVideo(VideoPath video, ImagePath rim, std::shared_ptr<CBonusSelection> bonusSel)
|
||||||
|
: CWindowObject(BORDERED), bonusSel(bonusSel)
|
||||||
|
{
|
||||||
|
OBJECT_CONSTRUCTION;
|
||||||
|
videoPlayer = std::make_shared<VideoWidgetOnce>(Point(0, 0), video, true, [this](){ exit(); });
|
||||||
|
setBackground(rim);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CampaignIntroVideo::exit()
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
GH.windows().pushWindow(bonusSel);
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<CampaignState> CBonusSelection::getCampaign()
|
std::shared_ptr<CampaignState> CBonusSelection::getCampaign()
|
||||||
{
|
{
|
||||||
return CSH->si->campState;
|
return CSH->si->campState;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "../windows/CWindowObject.h"
|
#include "../windows/CWindowObject.h"
|
||||||
|
|
||||||
#include "../lib/campaign/CampaignConstants.h"
|
#include "../lib/campaign/CampaignConstants.h"
|
||||||
|
#include "../lib/filesystem/ResourcePath.h"
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_BEGIN
|
VCMI_LIB_NAMESPACE_BEGIN
|
||||||
|
|
||||||
@@ -28,6 +29,19 @@ class CLabel;
|
|||||||
class CFlagBox;
|
class CFlagBox;
|
||||||
class ISelectionScreenInfo;
|
class ISelectionScreenInfo;
|
||||||
class ExtraOptionsTab;
|
class ExtraOptionsTab;
|
||||||
|
class VideoWidgetOnce;
|
||||||
|
class CBonusSelection;
|
||||||
|
|
||||||
|
|
||||||
|
class CampaignIntroVideo : public CWindowObject
|
||||||
|
{
|
||||||
|
std::shared_ptr<VideoWidgetOnce> videoPlayer;
|
||||||
|
std::shared_ptr<CBonusSelection> bonusSel;
|
||||||
|
|
||||||
|
void exit();
|
||||||
|
public:
|
||||||
|
CampaignIntroVideo(VideoPath video, ImagePath rim, std::shared_ptr<CBonusSelection> bonusSel);
|
||||||
|
};
|
||||||
|
|
||||||
/// Campaign screen where you can choose one out of three starting bonuses
|
/// Campaign screen where you can choose one out of three starting bonuses
|
||||||
class CBonusSelection : public CWindowObject
|
class CBonusSelection : public CWindowObject
|
||||||
|
|||||||
@@ -234,6 +234,7 @@ void ChroniclesExtractor::extractFiles(int no)
|
|||||||
tmpDir.cdUp();
|
tmpDir.cdUp();
|
||||||
QDir tmpDirData = tmpDir.filePath(tmpDir.entryList({"data"}, QDir::Filter::Dirs).front());
|
QDir tmpDirData = tmpDir.filePath(tmpDir.entryList({"data"}, QDir::Filter::Dirs).front());
|
||||||
extract(tmpDirData, outDirData, "bitmap.lod", std::vector<std::string>{"HPL003sh", "HPL102br", "HPL139", "HPS006kn", "HPS137", "HPS141", "HPL004sh", "hpl112bs", "HPL140", "hps007sh", "HPS138", "HPS142", "HPL006kn", "HPL137", "HPS003sh", "HPS102br", "HPS139", "HPS143", "hpl007sh", "HPL138", "HPS004sh", "hps112bs", "HPS140"});
|
extract(tmpDirData, outDirData, "bitmap.lod", std::vector<std::string>{"HPL003sh", "HPL102br", "HPL139", "HPS006kn", "HPS137", "HPS141", "HPL004sh", "hpl112bs", "HPL140", "hps007sh", "HPS138", "HPS142", "HPL006kn", "HPL137", "HPS003sh", "HPS102br", "HPS139", "HPS143", "hpl007sh", "HPL138", "HPS004sh", "hps112bs", "HPS140"});
|
||||||
|
extract(tmpDirData, outDirData, "lbitmap.lod", std::vector<std::string>{"INTRORIM"});
|
||||||
|
|
||||||
rename(outDirData);
|
rename(outDirData);
|
||||||
rename(outDirSprites);
|
rename(outDirSprites);
|
||||||
|
|||||||
Reference in New Issue
Block a user