Skip to content

Commit b0f34ef

Browse files
committed
Fix options bug
1 parent eeeb16d commit b0f34ef

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"gd": {
44
"win": "2.206"
55
},
6-
"version": "v0.8.1",
6+
"version": "v0.8.2",
77
"id": "zalphalaneous.minecraft",
88
"name": "Minecraftify!",
99
"developer": "Alphalaneous",

src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "ui/hooks/FLAlertLayer.h"
99
#include "ui/hooks/PauseLayer.h"
1010
#include "ui/hooks/PlayLayer.h"
11+
#include "ui/hooks/GJDropDownLayer.h"
1112

1213
$execute{
1314
setlocale( LC_ALL, "en_US.utf8" );

src/ui/hooks/GJDropDownLayer.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#pragma once
2+
3+
#ifndef MYGJDROPDOWNLAYER_H
4+
#define MYGJDROPDOWNLAYER_H
5+
6+
#include <Geode/Geode.hpp>
7+
#include <Geode/modify/GJDropDownLayer.hpp>
8+
9+
using namespace geode::prelude;
10+
11+
class $modify(MyGJDropDownLayer, GJDropDownLayer){
12+
13+
void showLayer(bool p0){
14+
setVisible(true);
15+
removeFromParentAndCleanup(false);
16+
CCScene* currentScene = CCDirector::get()->getRunningScene();
17+
currentScene->addChild(this);
18+
19+
if(p0){
20+
m_mainLayer->setPosition(m_endPosition);
21+
setOpacity(125);
22+
}
23+
else{
24+
CCMoveTo* moveTo = CCMoveTo::create(0.5, m_endPosition);
25+
CCEaseInOut* easeInOut = CCEaseInOut::create(moveTo, 2.0);
26+
CCSequence* sequence = CCSequence::create(easeInOut, 0);
27+
28+
m_mainLayer->runAction(sequence);
29+
30+
CCFadeTo* fadeTo = CCFadeTo::create(0.5, 125);
31+
runAction(fadeTo);
32+
}
33+
}
34+
};
35+
36+
#endif

0 commit comments

Comments
 (0)