Skip to content

Commit 027242f

Browse files
committed
Okay
1 parent f16dac9 commit 027242f

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
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.17
2+
- Just not do it like that, why am I doing it like that, apparently doing it like that breaks, here's another stupid update, doing it like that shouldn't break, I am slowly trying to make things rely less on hooks, but sometimes you have to. The world is evil with it's sussy impostor nodes that do sussy things!
3+
14
# 2.0.16
25
- Fix a bug with setting sprites
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.16",
9+
"version": "v2.0.17",
1010
"id": "alphalaneous.happy_textures",
1111
"name": "Happy Textures :3",
1212
"developer": "Alphalaneous",

src/nodes/CCMenu.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,8 @@ class $nodeModify(MyCCMenu, cocos2d::CCMenu) {
6868
}
6969

7070
void checkMouse(float) {
71-
if (!reinterpret_cast<const void*>(this)) return;
72-
// at this point this should fix it, if not, the game's fucked
73-
if (getID() == "channels-menu") return;
7471
if (!nodeIsVisible(this)) return;
7572

76-
#ifdef GEODE_IS_DESKTOP
7773
auto mousePos = getMousePos();
7874
auto local = convertToNodeSpace(mousePos);
7975
for (auto child : CCArrayExt<CCNode*>(getChildren())) {
@@ -85,16 +81,6 @@ class $nodeModify(MyCCMenu, cocos2d::CCMenu) {
8581
button->checkTouch(!isValid);
8682
}
8783
}
88-
#else
89-
auto self = reinterpret_cast<CCMenu*>(this);
90-
if (auto item = self->m_pSelectedItem) {
91-
auto realItem = typeinfo_cast<CCMenuItemSpriteExtra*>(item);
92-
if (!realItem) return;
93-
if (EventCCMenuItemSpriteExtra* button = static_cast<EventCCMenuItemSpriteExtra*>(realItem)) {
94-
button->checkTouch(!button->m_bSelected);
95-
}
96-
}
97-
#endif
9884
}
9985
};
10086

src/nodes/CCMenuItemSpriteExtra.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,19 @@ class $modify(EventCCMenuItemSpriteExtra, CCMenuItemSpriteExtra) {
9494
if (!m_fields->overrideOnClick) {
9595
CCMenuItemSpriteExtra::selected();
9696
}
97+
#ifndef GEODE_IS_DESKTOP
98+
checkTouch(false);
99+
#endif
97100
}
98101

99102
void unselected() {
100103
modifyForEach(m_fields->onRelease);
101104
if (!m_fields->overrideOnRelease) {
102105
CCMenuItemSpriteExtra::unselected();
103106
}
107+
#ifndef GEODE_IS_DESKTOP
108+
checkTouch(true);
109+
#endif
104110
}
105111

106112
void activate() {

0 commit comments

Comments
 (0)