fix the styling of the geode tab buttons

This commit is contained in:
HJfod 2024-05-04 23:14:53 +03:00
parent 03385d07e1
commit d0617d1b63

View file

@ -260,9 +260,9 @@ bool GeodeTabSprite::init(const char* iconFrame, const char* text, float width,
this->addChildAtPosition(m_icon, Anchor::Left, ccp(16, 0), false);
m_label = CCLabelBMFont::create(text, "bigFont.fnt");
m_label->limitLabelWidth(this->getContentWidth() - 34, .55f, .1f);
m_label->setAnchorPoint({ .0f, .5f });
this->addChildAtPosition(m_label, Anchor::Left, ccp(28, 0), false);
m_label->limitLabelWidth(this->getContentWidth() - 34, clamp(width * .0045f, .35f, .55f), .1f);
m_label->setAnchorPoint({ .5f, .5f });
this->addChildAtPosition(m_label, Anchor::Left, ccp(28 + itemSize.width / 2 - iconSize.width, 0), false);
return true;
}