1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix issues discovered by self-review

This commit is contained in:
Ivan Savenko
2023-05-08 23:37:31 +03:00
parent 8504b891a8
commit edd5d11734
3 changed files with 21 additions and 14 deletions

View File

@@ -58,7 +58,8 @@ private:
/// if true, then scrolling was blocked via ctrl and should not restart until player move cursor outside scrolling area
bool scrollingWasBlocked;
const CSpell *spellBeingCasted; //nullptr if none
/// spell for which player is selecting target, or nullptr if none
const CSpell *spellBeingCasted;
std::shared_ptr<MapAudioPlayer> mapAudio;
std::shared_ptr<AdventureMapWidget> widget;
@@ -66,10 +67,14 @@ private:
private:
void setState(EAdventureState state);
void adjustActiveness(); //should be called every time at AI/human turn transition; blocks GUI during AI turn
const IShipyard * ourInaccessibleShipyard(const CGObjectInstance *obj) const; //checks if obj is our ashipyard and cursor is 0,0 -> returns shipyard or nullptr else
/// updates active state of game window whenever game state changes
void adjustActiveness();
/// checks if obj is our ashipyard and cursor is 0,0 -> returns shipyard or nullptr else
const IShipyard * ourInaccessibleShipyard(const CGObjectInstance *obj) const;
/// check and if necessary reacts on scrolling by moving cursor to screen edge
void handleMapScrollingUpdate();
void showMoveDetailsInStatusbar(const CGHeroInstance & hero, const CGPathNode & pathNode);
@@ -78,10 +83,12 @@ private:
/// exits currently opened world view mode and returns to normal map
void exitCastingMode();
/// casts current spell at specified location
void performSpellcasting(const int3 & castTarget);
protected:
// CIntObject interface implementation
/// CIntObject interface implementation
void activate() override;
void deactivate() override;

View File

@@ -51,7 +51,7 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType)
buttonOptions = std::make_shared<CButton>(Point(411, 510), "GSPBUTT.DEF", CGI->generaltexth->zelp[46], std::bind(&CLobbyScreen::toggleTab, this, tabOpt), EShortcut::LOBBY_ADDITIONAL_OPTIONS);
};
buttonChat = std::make_shared<CButton>(Point(619, 83), "GSPBUT2.DEF", CGI->generaltexth->zelp[48], std::bind(&CLobbyScreen::toggleChat, this), EShortcut::LOBBY_HIDE_CHAT);
buttonChat = std::make_shared<CButton>(Point(619, 80), "GSPBUT2.DEF", CGI->generaltexth->zelp[48], std::bind(&CLobbyScreen::toggleChat, this), EShortcut::LOBBY_HIDE_CHAT);
buttonChat->addTextOverlay(CGI->generaltexth->allTexts[532], FONT_SMALL);
switch(screenType)

View File

@@ -452,7 +452,7 @@
// Resource & Data bar
{
"type": "adventurePlayerTexture",
"name" : "backgroundBottomCenter",
"name" : "backgroundLeftOfResourceDateBar",
"image" : "DiBoxBck.pcx",
"area" : { "left": 3, "bottom" : 4, "right" : 797, "height" : 21 }
},
@@ -599,7 +599,7 @@
},
{
"type": "adventureMapIcon",
"name": "worldViewIconOre",
"name": "worldViewIconMineOre",
"image" : "VwSymbol.def",
"index" : 7,
"perPlayer" : 19,
@@ -641,7 +641,7 @@
// World view - resources icons
{
"type": "adventureMapIcon",
"name": "worldViewIconMineWood",
"name": "worldViewIconResourceWood",
"image" : "VwSymbol.def",
"index" : 12,
"perPlayer" : 19,
@@ -649,7 +649,7 @@
},
{
"type": "adventureMapIcon",
"name": "worldViewIconMineMercury",
"name": "worldViewIconResourceMercury",
"image" : "VwSymbol.def",
"index" : 13,
"perPlayer" : 19,
@@ -657,7 +657,7 @@
},
{
"type": "adventureMapIcon",
"name": "worldViewIconOre",
"name": "worldViewIconResourceOre",
"image" : "VwSymbol.def",
"index" : 14,
"perPlayer" : 19,
@@ -665,7 +665,7 @@
},
{
"type": "adventureMapIcon",
"name": "worldViewIconMineSulfur",
"name": "worldViewIconResourceSulfur",
"image" : "VwSymbol.def",
"index" : 15,
"perPlayer" : 19,
@@ -673,7 +673,7 @@
},
{
"type": "adventureMapIcon",
"name": "worldViewIconMineCrystal",
"name": "worldViewIconResourceCrystal",
"image" : "VwSymbol.def",
"index" : 16,
"perPlayer" : 19,
@@ -681,7 +681,7 @@
},
{
"type": "adventureMapIcon",
"name": "worldViewIconMineGems",
"name": "worldViewIconResourceGems",
"image" : "VwSymbol.def",
"index" : 17,
"perPlayer" : 19,
@@ -689,7 +689,7 @@
},
{
"type": "adventureMapIcon",
"name": "worldViewIconMineGold",
"name": "worldViewIconResourceGold",
"image" : "VwSymbol.def",
"index" : 18,
"perPlayer" : 19,