mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-13 23:57:41 +02:00
Fixed visibility of corner gems
This commit is contained in:
@@ -32,8 +32,10 @@
|
||||
CAdventureMapWidget::CAdventureMapWidget()
|
||||
: state(EGameState::NOT_INITIALIZED)
|
||||
{
|
||||
pos.w = 800;
|
||||
pos.h = 600;
|
||||
pos.x = pos.y = 0;
|
||||
pos.w = GH.screenDimensions().x;
|
||||
pos.h = GH.screenDimensions().y;
|
||||
|
||||
REGISTER_BUILDER("adventureInfobar", &CAdventureMapWidget::buildInfobox );
|
||||
REGISTER_BUILDER("adventureMapImage", &CAdventureMapWidget::buildMapImage );
|
||||
REGISTER_BUILDER("adventureMapButton", &CAdventureMapWidget::buildMapButton );
|
||||
@@ -154,7 +156,12 @@ std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapButton(const JsonNode &
|
||||
std::shared_ptr<CIntObject> CAdventureMapWidget::buildMapContainer(const JsonNode & input)
|
||||
{
|
||||
auto position = readTargetArea(input["area"]);
|
||||
auto result = std::make_shared<CAdventureMapContainerWidget>();
|
||||
std::shared_ptr<CAdventureMapContainerWidget> result;
|
||||
|
||||
if (input["overlay"].Bool())
|
||||
result = std::make_shared<CAdventureMapOverlayWidget>();
|
||||
else
|
||||
result = std::make_shared<CAdventureMapContainerWidget>();
|
||||
|
||||
result->moveBy(position.topLeft());
|
||||
subwidgetSizes.push_back(position);
|
||||
@@ -388,3 +395,8 @@ void CAdventureMapIcon::setPlayer(const PlayerColor & player)
|
||||
{
|
||||
image->setFrame(index + player.getNum() * iconsPerPlayer);
|
||||
}
|
||||
|
||||
void CAdventureMapOverlayWidget::show(SDL_Surface * to)
|
||||
{
|
||||
CIntObject::showAll(to);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user