Skip to content

Commit c2452e1

Browse files
committed
a
1 parent 3a6513d commit c2452e1

31 files changed

Lines changed: 564 additions & 28 deletions

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 2.8.7
2+
3+
- Added info button for mods that have per player options
4+
15
# 2.8.6
26

37
- Fixed Speedhack Keybinds not working correctly

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"geode": "5.5.3",
2+
"geode": "5.7.1",
33
"version": "v2.8.6",
44
"gd": {
55
"win": "2.2081",

resources/sprites/free/acu.png

535 KB
Loading
459 KB
Loading
271 KB
Loading

resources/translations

src/Client/ButtonModule.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ ModuleNode* ButtonModule::getNode()
1010

1111
void ButtonModule::onKeybindActivated(KeyState state)
1212
{
13-
onClick();
14-
NotificationManager::get()->notifyToast(getNotificationString());
13+
if (state.isDown && !state.isRepeat)
14+
{
15+
onClick();
16+
NotificationManager::get()->notifyToast(getNotificationString());
17+
}
1518
}
1619

1720
std::string ButtonModule::getNotificationString()

src/Client/LayoutModule.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#include "LayoutModule.hpp"
2+
#include "ButtonModuleNode.hpp"
3+
#include <EditLayoutUI.hpp>
4+
5+
void LayoutModule::save()
6+
{
7+
8+
}
9+
10+
void LayoutModule::load()
11+
{
12+
13+
}
14+
15+
16+
void LayoutModule::setPreviewNode(std::function<cocos2d::CCNode*()> preview)
17+
{
18+
this->previewNode = std::move(preview);
19+
}
20+
21+
cocos2d::CCNode* LayoutModule::createPreviewNode()
22+
{
23+
return previewNode();
24+
}
25+
26+
ModuleNode* LayoutModule::getNode()
27+
{
28+
return ButtonModuleNode::create(this);
29+
}
30+
31+
void LayoutModule::onClick()
32+
{
33+
qolmod::EditLayoutUI::create(this)->show();
34+
}

src/Client/LayoutModule.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#pragma once
2+
3+
#include "ButtonModule.hpp"
4+
5+
class LayoutModule : public ButtonModule
6+
{
7+
protected:
8+
std::function<cocos2d::CCNode*()> previewNode = nullptr;
9+
10+
virtual void save();
11+
virtual void load();
12+
13+
virtual void onClick();
14+
15+
void setPreviewNode(std::function<cocos2d::CCNode*()> preview);
16+
17+
public:
18+
cocos2d::CCNode* createPreviewNode();
19+
20+
virtual ModuleNode* getNode();
21+
};

src/Client/Module.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class Module
4949
{
5050
protected:
5151
friend class AndroidUI;
52+
friend class OptionsUI;
5253

5354
static inline std::vector<Module*> moduleMap = {};
5455

@@ -68,6 +69,7 @@ class Module
6869
std::string onEnableWarning = "";
6970
int sortPriority = 8008135;
7071
KeyConfigStruct keyConfig = {};
72+
bool showSeperateOptionsInfo = false;
7173

7274
bool shortcutEnabled = false;
7375
cocos2d::CCNode* shortcutNode = nullptr;

0 commit comments

Comments
 (0)