mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Fix minor points
This commit is contained in:
parent
dbc3a93013
commit
d9a2a7bfd0
@ -551,7 +551,7 @@ void CServerHandler::sendStartGame(bool allowOnlyAI) const
|
|||||||
catch (const std::exception & e)
|
catch (const std::exception & e)
|
||||||
{
|
{
|
||||||
showServerError( std::string("Unable to start map! Reason: ") + e.what());
|
showServerError( std::string("Unable to start map! Reason: ") + e.what());
|
||||||
throw e;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LobbyStartGame lsg;
|
LobbyStartGame lsg;
|
||||||
|
@ -587,6 +587,8 @@ CLoadingScreen::CLoadingScreen()
|
|||||||
{
|
{
|
||||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||||
|
|
||||||
|
addUsedEvents(TIME);
|
||||||
|
|
||||||
CCS->musich->stopMusic(5000);
|
CCS->musich->stopMusic(5000);
|
||||||
|
|
||||||
const auto & conf = CMainMenuConfig::get().getConfig()["loading"];
|
const auto & conf = CMainMenuConfig::get().getConfig()["loading"];
|
||||||
@ -609,11 +611,8 @@ CLoadingScreen::~CLoadingScreen()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLoadingScreen::showAll(Canvas & to)
|
void CLoadingScreen::tick(uint32_t msPassed)
|
||||||
{
|
{
|
||||||
//FIXME: filling screen with transparency? BLACK intended?
|
|
||||||
//Rect rect(0, 0, to->w, to->h);
|
|
||||||
//CSDL_Ext::fillRect(to, rect, Colors::TRANSPARENCY);
|
|
||||||
if(!progressBlocks.empty())
|
if(!progressBlocks.empty())
|
||||||
{
|
{
|
||||||
int status = float(get()) / 255.f * progressBlocks.size();
|
int status = float(get()) / 255.f * progressBlocks.size();
|
||||||
@ -624,8 +623,6 @@ void CLoadingScreen::showAll(Canvas & to)
|
|||||||
progressBlocks.at(i)->visible = true;
|
progressBlocks.at(i)->visible = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CWindowObject::showAll(to);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CLoadingScreen::getBackground()
|
std::string CLoadingScreen::getBackground()
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../widgets/Images.h"
|
|
||||||
#include "../windows/CWindowObject.h"
|
#include "../windows/CWindowObject.h"
|
||||||
#include "../../lib/JsonNode.h"
|
#include "../../lib/JsonNode.h"
|
||||||
#include "../../lib/LoadProgress.h"
|
#include "../../lib/LoadProgress.h"
|
||||||
@ -24,6 +23,7 @@ class CTextInput;
|
|||||||
class CGStatusBar;
|
class CGStatusBar;
|
||||||
class CTextBox;
|
class CTextBox;
|
||||||
class CTabbedInt;
|
class CTabbedInt;
|
||||||
|
class CAnimImage;
|
||||||
class CAnimation;
|
class CAnimation;
|
||||||
class CButton;
|
class CButton;
|
||||||
class CFilledTexture;
|
class CFilledTexture;
|
||||||
@ -191,7 +191,7 @@ public:
|
|||||||
CLoadingScreen();
|
CLoadingScreen();
|
||||||
~CLoadingScreen();
|
~CLoadingScreen();
|
||||||
|
|
||||||
void showAll(Canvas & to) override;
|
void tick(uint32_t msPassed) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern std::shared_ptr<CMainMenu> CMM;
|
extern std::shared_ptr<CMainMenu> CMM;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user