mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 18:30:06 +00:00
Fixing geo icon size
This commit is contained in:
parent
9590e2cc52
commit
cf0b268822
1 changed files with 8 additions and 11 deletions
|
|
@ -350,23 +350,20 @@ void IconInfo::UpdateTextureInfo()
|
||||||
{
|
{
|
||||||
columns_ = texture_.size_.x / iconWidth_;
|
columns_ = texture_.size_.x / iconWidth_;
|
||||||
rows_ = texture_.size_.y / iconHeight_;
|
rows_ = texture_.size_.y / iconHeight_;
|
||||||
|
|
||||||
if (hotX_ == -1 || hotY_ == -1)
|
|
||||||
{
|
|
||||||
hotX_ = static_cast<std::int32_t>(iconWidth_ / 2);
|
|
||||||
hotY_ = static_cast<std::int32_t>(iconHeight_ / 2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
columns_ = 1u;
|
columns_ = 1u;
|
||||||
rows_ = 1u;
|
rows_ = 1u;
|
||||||
|
|
||||||
if (hotX_ == -1 || hotY_ == -1)
|
iconWidth_ = static_cast<std::size_t>(texture_.size_.x);
|
||||||
{
|
iconHeight_ = static_cast<std::size_t>(texture_.size_.y);
|
||||||
hotX_ = static_cast<std::int32_t>(texture_.size_.x / 2);
|
}
|
||||||
hotY_ = static_cast<std::int32_t>(texture_.size_.y / 2);
|
|
||||||
}
|
if (hotX_ == -1 || hotY_ == -1)
|
||||||
|
{
|
||||||
|
hotX_ = static_cast<std::int32_t>(iconWidth_ / 2);
|
||||||
|
hotY_ = static_cast<std::int32_t>(iconHeight_ / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
numIcons_ = columns_ * rows_;
|
numIcons_ = columns_ * rows_;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue