Skip to content

Commit

Permalink
disable level desc on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Oct 16, 2023
1 parent 131d27e commit b0ecd89
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/hooks/LevelCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class $modify(BILevelCell, LevelCell) {
auto res = self.setHookPriority("LevelCell::onViewProfile", 99999);
}

void showDesc() {
/*void showDesc() {
if(m_fields->m_levelDesc) return;
auto parent = CCSprite::create();
Expand All @@ -28,7 +28,7 @@ class $modify(BILevelCell, LevelCell) {
auto label = CCLabelBMFont::create(m_level->m_levelDesc.c_str(), "bigFont.fnt");
label->setScale(.6f);
parent->addChild(label);*/
parent->addChild(label);/
cocos2d::extension::CCScale9Sprite* descBg = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", { 0.0f, 0.0f, 80.0f, 80.0f });
descBg->setContentSize({340,55});
Expand Down Expand Up @@ -84,7 +84,7 @@ class $modify(BILevelCell, LevelCell) {
if(getMousePos() == m_lastMousePos && BetterInfo::isHoveringNode(this) && typeinfo_cast<CCTransitionScene*>(CCScene::get()) == nullptr) {
m_hoverCount++;
if(m_hoverCount == 3) {
if(m_hoverCount == 5) {
log::info("Hovering: {}", m_level->m_levelName);
showDesc();
}
Expand All @@ -94,7 +94,7 @@ class $modify(BILevelCell, LevelCell) {
};
m_lastMousePos = getMousePos();
}
}*/

/*
* Hooks
Expand All @@ -117,7 +117,7 @@ class $modify(BILevelCell, LevelCell) {

LevelCell::loadCustomLevelCell();

this->getScheduler()->scheduleSelector(schedule_selector(BILevelCell::checkHover), this, 0.1f, false);
//this->getScheduler()->scheduleSelector(schedule_selector(BILevelCell::checkHover), this, 0.1f, false);

auto layer = static_cast<CCLayer*>(this->getChildren()->objectAtIndex(1));

Expand Down

0 comments on commit b0ecd89

Please sign in to comment.