mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:50:05 +00:00
Fix rendering on setting change, and location of icon
This commit is contained in:
parent
1ff686629b
commit
1c23718654
1 changed files with 3 additions and 6 deletions
|
|
@ -166,12 +166,8 @@ OverlayLayer::~OverlayLayer() = default;
|
||||||
|
|
||||||
void OverlayLayerImpl::SetCusorLocation(common::Coordinate coordinate)
|
void OverlayLayerImpl::SetCusorLocation(common::Coordinate coordinate)
|
||||||
{
|
{
|
||||||
const double offset = 3 * cursorScale_ / 2;
|
geoIcons_->SetIconLocation(
|
||||||
geoIcons_->SetIconLocation(cursorIcon_,
|
cursorIcon_, coordinate.latitude_, coordinate.longitude_);
|
||||||
coordinate.latitude_,
|
|
||||||
coordinate.longitude_,
|
|
||||||
-offset,
|
|
||||||
offset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverlayLayerImpl::SetupGeoIcons()
|
void OverlayLayerImpl::SetupGeoIcons()
|
||||||
|
|
@ -182,6 +178,7 @@ void OverlayLayerImpl::SetupGeoIcons()
|
||||||
"{}x{}", types::GetTextureName(types::ImageTexture::Dot3), cursorScale_);
|
"{}x{}", types::GetTextureName(types::ImageTexture::Dot3), cursorScale_);
|
||||||
cursorIconImage_ = manager::ResourceManager::LoadImageResource(
|
cursorIconImage_ = manager::ResourceManager::LoadImageResource(
|
||||||
texturePath, cursorIconName_, cursorScale_);
|
texturePath, cursorIconName_, cursorScale_);
|
||||||
|
manager::ResourceManager::BuildAtlas();
|
||||||
|
|
||||||
auto coordinate = currentPosition_.coordinate();
|
auto coordinate = currentPosition_.coordinate();
|
||||||
geoIcons_->StartIconSheets();
|
geoIcons_->StartIconSheets();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue