Skip to content

Commit

Permalink
Fixes and more cells
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphalaneous committed Aug 29, 2024
1 parent c1550f1 commit 5d09208
Show file tree
Hide file tree
Showing 27 changed files with 52 additions and 140 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"android": "2.206",
"mac": "2.206"
},
"version": "v1.4.0",
"version": "v1.4.1",
"id": "alphalaneous.happy_textures",
"name": "Happy Textures :3",
"developer": "Alphalaneous",
Expand Down
5 changes: 0 additions & 5 deletions src/CCDirector.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYCCDIRECTOR_H
#define MYCCDIRECTOR_H

#include <Geode/Geode.hpp>
#include <Geode/modify/CCDirector.hpp>
#include "UIModding.h"
Expand Down Expand Up @@ -34,6 +31,4 @@ class $modify(CCDirector){
}
};

#endif

#endif
7 changes: 1 addition & 6 deletions src/DataNode.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef DATANODE_H
#define DATANODE_H

#include <Geode/Geode.hpp>

using namespace geode::prelude;
Expand All @@ -27,6 +24,4 @@ class DataNode : public CCNode {
m_data = data;
return true;
}
};

#endif
};
7 changes: 1 addition & 6 deletions src/FileWatcher.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef FILEWATCHER_H
#define FILEWATCHER_H

#include <filesystem>
#include <chrono>
#include <thread>
Expand Down Expand Up @@ -79,6 +76,4 @@ class FileWatcher {
auto el = m_paths.find(key);
return el != m_paths.end();
}
};

#endif
};
7 changes: 1 addition & 6 deletions src/UIModding.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef UIMODDING_H
#define UIMODDING_H

#include <Geode/Geode.hpp>
#include "FileWatcher.h"
using namespace geode::prelude;
Expand Down Expand Up @@ -70,6 +67,4 @@ class UIModding {
};
return instance;
}
};

#endif
};
10 changes: 3 additions & 7 deletions src/Utils.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef HAPPYUTILS_H
#define HAPPYUTILS_H

#include <Geode/Geode.hpp>
using namespace geode::prelude;

Expand Down Expand Up @@ -104,7 +101,6 @@ namespace Utils {
std::string resourcesDir = fmt::format("{}{}", CCFileUtils::sharedFileUtils()->getWritablePath2(), "Resources\\");
packPaths.push_back(resourcesDir);

return packPaths;
}
}
#endif
return packPaths;
}
}
5 changes: 0 additions & 5 deletions src/alerts/AlertDelegate.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef __BROWNALERT_HPP
#define __BROWNALERT_HPP

#include <Geode/Geode.hpp>

using namespace geode::prelude;
Expand All @@ -21,5 +18,3 @@ class AlertDelegate : public FLAlertLayer {
CCTouchDispatcher::get()->unregisterForcePrio(this);
}
};

#endif
7 changes: 1 addition & 6 deletions src/alerts/CustomAlert.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
#pragma once

#ifndef __BLOCKMENU_HPP
#define __BLOCKMENU_HPP

#include "AlertDelegate.h"

class CustomAlert : public AlertDelegate {
public:
static CustomAlert* create(float width, float height, std::string texture, std::string title);
};

#endif
};
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "nodes/MenuGameLayer.h"
#include "nodes/MenuLayer.h"
#include "nodes/GJChestSprite.h"
#include "nodes/CCTextInputNode.h"
#include "icons/IconHandler.h"
#include "CCDirector.h"

Expand Down
9 changes: 2 additions & 7 deletions src/nodes/CCLabelBMFont.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYCCLABELBMFONT_H
#define MYCCLABELBMFONT_H

#include <Geode/Geode.hpp>
#include <Geode/modify/CCLabelBMFont.hpp>
#include "../Utils.h"
Expand Down Expand Up @@ -44,7 +41,7 @@ class $modify(MyCCLabelBMFont, CCLabelBMFont){
}

#endif

return ret;
}

Expand All @@ -65,6 +62,4 @@ class $modify(MyCCLabelBMFont, CCLabelBMFont){
}

#endif
};

#endif
};
5 changes: 0 additions & 5 deletions src/nodes/CCMenu.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYCCMENU_H
#define MYCCMENU_H

#ifdef GEODE_IS_WINDOWS

#include <Geode/Geode.hpp>
Expand Down Expand Up @@ -100,6 +97,4 @@ class $modify(EventCCMenu, CCMenu){
}
};

#endif

#endif
6 changes: 1 addition & 5 deletions src/nodes/CCMenuItemSpriteExtra.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYCCMENUITEMSPRITEXTRA_H
#define MYCCMENUITEMSPRITEXTRA_H

#include <Geode/Geode.hpp>
#include <Geode/modify/CCMenuItemSpriteExtra.hpp>
#include "CCScene.h"
Expand Down Expand Up @@ -158,5 +155,4 @@ class $modify(EventCCMenuItemSpriteExtra, CCMenuItemSpriteExtra) {
}
}
}
};
#endif
};
5 changes: 0 additions & 5 deletions src/nodes/CCScale9Sprite.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYCCSCALE9SPRITE_H
#define MYCCSCALE9SPRITE_H

#include <Geode/Geode.hpp>
#include <Geode/modify/CCScale9Sprite.hpp>
#include "../Macros.h"
Expand Down Expand Up @@ -232,6 +229,4 @@ class $modify(MyCCScale9Sprite, CCScale9Sprite){
}
};

#endif

#endif
7 changes: 1 addition & 6 deletions src/nodes/CCScene.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYCCSCENE_H
#define MYCCSCENE_H

#include <Geode/Geode.hpp>
#include <Geode/modify/CCScene.hpp>
#include "../UIModding.h"
Expand Down Expand Up @@ -42,6 +39,4 @@ class $modify(MyCCScene, CCScene){
}
m_fields->m_currentCount = this->getChildrenCount();
}
};

#endif
};
22 changes: 22 additions & 0 deletions src/nodes/CCTextInputNode.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#include <Geode/Geode.hpp>
#include <Geode/modify/CCTextInputNode.hpp>
#include "../Macros.h"

class $modify(MyCCTextInputNode, CCTextInputNode){

/*void refreshLabel() {
CCTextInputNode::refreshLabel();
if (m_placeholderLabel && m_placeholderLabel->getColor() == ccColor3B{120, 170, 240}) {
m_placeholderLabel->setColor({0, 0, 0});
std::optional<ColorData> dataOpt = UIModding::get()->getColors("text-input-placeholder");
if(dataOpt.has_value()){
ColorData data = dataOpt.value();
//m_placeholderLabel->setColor(data.color);
m_placeholderLabel->setOpacity(data.alpha);
}
}
}*/ //todo find method I can hook to change this
};
12 changes: 7 additions & 5 deletions src/nodes/CellColors.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
#pragma once

#ifndef MYLEVELCELL_H
#define MYLEVELCELL_H

#include <Geode/Geode.hpp>
#include <Geode/modify/LevelCell.hpp>
#include <Geode/modify/LevelListCell.hpp>
#include <Geode/modify/GJScoreCell.hpp>
#include <Geode/modify/MapPackCell.hpp>
#include <Geode/modify/AchievementCell.hpp>
#include <Geode/modify/GJMessageCell.hpp>
#include <Geode/modify/GJUserCell.hpp>

#include "../Macros.h"

using namespace geode::prelude;

setCellColors(LevelCell, loadFromLevel, GJGameLevel);
setCellColors(LevelListCell, loadFromList, GJLevelList);
setCellColors(GJScoreCell, loadFromScore, GJUserScore);
setCellColors(GJUserCell, loadFromScore, GJUserScore);

#ifndef GEODE_IS_MACOS

setCellColors(AchievementCell, loadFromDict, CCDictionary);
setCellColors(GJMessageCell, loadFromMessage, GJUserMessage);
setCellColors(MapPackCell, loadFromMapPack, GJMapPack);

#endif

#endif
7 changes: 1 addition & 6 deletions src/nodes/CommentCell.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYCOMMENTCELL_H
#define MYCOMMENTCELL_H

#include <Geode/Geode.hpp>
#include <Geode/modify/CommentCell.hpp>

Expand Down Expand Up @@ -84,6 +81,4 @@ class $modify(MyCommentCell, CommentCell) {
}
}
}
};

#endif
};
7 changes: 1 addition & 6 deletions src/nodes/EditLevelLayer.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYEDITLEVELLAYER_H
#define MYEDITLEVELLAYER_H

#include <Geode/Geode.hpp>
#include <Geode/modify/EditLevelLayer.hpp>

Expand Down Expand Up @@ -36,6 +33,4 @@ class $modify(MyEditLevelLayer, EditLevelLayer){
}
return true;
}
};

#endif
};
7 changes: 1 addition & 6 deletions src/nodes/GJChestSprite.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYGJCHESTSPRITE_H
#define MYGJCHESTSPRITE_H

#include <Geode/Geode.hpp>
#include <Geode/modify/GJChestSprite.hpp>

Expand Down Expand Up @@ -54,6 +51,4 @@ class $modify(MyGJChestSprite, GJChestSprite){
}
}
}
};

#endif
};
7 changes: 1 addition & 6 deletions src/nodes/GJCommentListLayer.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYGJCOMMENTLISTLAYER_H
#define MYGJCOMMENTLISTLAYER_H

#include <Geode/Geode.hpp>
#include <Geode/modify/GJCommentListLayer.hpp>
#include "CCScale9Sprite.h"
Expand Down Expand Up @@ -157,6 +154,4 @@ class $modify(MyGJCommentListLayer, GJCommentListLayer) {
addChild(parentNode);
}
#endif
};

#endif
};
5 changes: 0 additions & 5 deletions src/nodes/GJDropDownLayer.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#pragma once

#ifndef MYGJDROPDOWNLAYER_H
#define MYGJDROPDOWNLAYER_H

#include <Geode/Geode.hpp>
#include <Geode/modify/GJDropDownLayer.hpp>

Expand Down Expand Up @@ -46,6 +43,4 @@ class $modify(MyGJDropDownLayer, GJDropDownLayer){
}
};

#endif

#endif
Loading

0 comments on commit 5d09208

Please sign in to comment.