Skip to content

Commit

Permalink
3
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Feb 26, 2024
1 parent 330d5ca commit 7c77953
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"geode": "2.0.0",
"version": "v1.0.0-beta.2",
"version": "v1.0.0-beta.3",
"gd": {
"win": "2.204",
"mac": "2.200",
Expand Down
12 changes: 9 additions & 3 deletions src/CCLabelBMFontExt.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ struct LabelPart
LabelPart(LabelPartType type, std::string ext)
{
this->type = type;
this->extra = geode::utils::string::toLower(ext);
this->extra = ext;
}

std::string fileNameForEmoji()
Expand All @@ -132,7 +132,7 @@ struct LabelPart

for (size_t i = 0; i < emojis.size(); i++)
{
if (emojis[i].first == extra)
if (geode::utils::string::toLower(emojis[i].first) == geode::utils::string::toLower(extra))
return emojis[i].second;
}

Expand Down Expand Up @@ -236,7 +236,7 @@ class CCLabelBMFontExt : public CCMenu
for (size_t i = 0; i < parts.size(); i++)
{
auto seg = parts[i];
log::info("type: {}, extra: {}, filename: {}", seg.type == LabelPartType::Emoji ? "Emoji" : "Text", seg.extra, seg.fileNameForEmoji());
//log::info("type: {}, extra: {}, filename: {}", seg.type == LabelPartType::Emoji ? "Emoji" : "Text", seg.extra, seg.fileNameForEmoji());

if (seg.type == LabelPartType::Text)
{
Expand Down Expand Up @@ -296,6 +296,12 @@ class CCLabelBMFontExt : public CCMenu
}
}

CCArrayExt<CCNode*> objects = this->getChildren();

for (auto* obj : objects) {
obj->setPositionY(obj->getPositionY() + (20 * yPos));
}

this->setContentSize(ccp(wid, /*height*/20 * (yPos + 1)));
}

Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class $modify (CommentCell)

if (lbl2)
{
lbl2->setPosition(txt->getPosition());
lbl2->setAnchorPoint(ccp(0, 0));
lbl2->setPosition(ccp(10, 40));
lbl2->setAnchorPoint(ccp(0, 0.5f));
lbl2->setMaxX(310, true);
lbl2->limitLabelHeight(50, 1.0f, 0.1f);

Expand Down

0 comments on commit 7c77953

Please sign in to comment.