Skip to content

Commit 8b271e3

Browse files
committed
Maybe fix
1 parent 80b4512 commit 8b271e3

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2.0.14
2+
- This might fix the BetterEdit crash, idk.
3+
14
# 2.0.13
25
- FIx a really stupid oversight
36

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"mac": "2.2074",
77
"ios": "2.2074"
88
},
9-
"version": "v2.0.13",
9+
"version": "v2.0.14",
1010
"id": "alphalaneous.happy_textures",
1111
"name": "Happy Textures :3",
1212
"developer": "Alphalaneous",

src/nodes/CCMenu.hpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ class $nodeModify(MyCCMenu, cocos2d::CCMenu) {
3434
bool lastAlert = false;
3535

3636
if (auto child = getSceneChildContainingNode(node)) {
37+
if (!child) return false;
3738
for (auto c : CCArrayExt<CCNode*>(child->getChildren())) {
39+
if (!c) continue;
3840
if (!AlphaUtils::Cocos::hasNode(node, c)) {
3941
shouldCheck = true;
4042
}
@@ -56,12 +58,6 @@ class $nodeModify(MyCCMenu, cocos2d::CCMenu) {
5658
auto sceneChild = getSceneChildContainingNode(node);
5759
if (!sceneChild) return false;
5860

59-
if (node->getChildrenCount() == 1) {
60-
if (typeinfo_cast<ButtonSprite*>(node->getChildren()->objectAtIndex(0))) {
61-
return false;
62-
}
63-
}
64-
6561
for (auto child : CCArrayExt<CCNode*>(CCScene::get()->getChildren())) {
6662
if (child->getZOrder() <= sceneChild->getZOrder()) continue;
6763
if (child->boundingBox().containsPoint(point) && nodeIsVisible(child)) {
@@ -74,6 +70,7 @@ class $nodeModify(MyCCMenu, cocos2d::CCMenu) {
7470
void checkMouse(float) {
7571
if (!nodeIsVisible(this)) return;
7672

73+
7774
#ifdef GEODE_IS_DESKTOP
7875
auto mousePos = getMousePos();
7976
auto local = convertToNodeSpace(mousePos);
@@ -92,9 +89,10 @@ class $nodeModify(MyCCMenu, cocos2d::CCMenu) {
9289
auto realItem = typeinfo_cast<CCMenuItemSpriteExtra*>(item);
9390
if (!realItem) return;
9491
if (EventCCMenuItemSpriteExtra* button = static_cast<EventCCMenuItemSpriteExtra*>(realItem)) {
95-
button->checkTouch(!button->isSelected());
92+
button->checkTouch(!button->m_bSelected);
9693
}
9794
}
9895
#endif
9996
}
100-
};
97+
};
98+

0 commit comments

Comments
 (0)