diff --git a/README.md b/README.md
index 10fb2ea..d54d8e0 100644
--- a/README.md
+++ b/README.md
@@ -4,3 +4,4 @@ This is where she makes a mod.
*Update logo.png to change your mod's icon (please)*
+I'm not an artist shut up
diff --git a/about.md b/about.md
index 9fb371f..920e46b 100644
--- a/about.md
+++ b/about.md
@@ -1,3 +1,5 @@
# Geode UI Tweaks
-Tweak the Geode Mod List UI a bit.
\ No newline at end of file
+Tweak the Geode Mod List UI a bit.
+
+(May or may not be more than a bit soon enough)
\ No newline at end of file
diff --git a/changelog.md b/changelog.md
index 9f04fab..146c42f 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,2 +1,5 @@
-# 1.0.0
-- Edit this file to change your mod's changelog.
+# v0.0.1
+
+- Transparent Lists
+- Larger Logos
+- Fix Mod Info Size
\ No newline at end of file
diff --git a/mod.json b/mod.json
index eb0677f..e08deed 100644
--- a/mod.json
+++ b/mod.json
@@ -1,5 +1,5 @@
{
- "geode": "4.0.0-beta.1",
+ "geode": "4.0.1",
"gd": {
"win": "2.2074",
"android": "2.2074",
@@ -27,6 +27,12 @@
"description": "Increases the size of the logos on mod items.",
"type": "bool",
"default": false
+ },
+ "fix-mod-info-size": {
+ "name": "Fix Mod Info Size",
+ "description": "Increases the width of the info container to extend all the way to the download count.",
+ "type": "bool",
+ "default": false
}
}
}
diff --git a/src/main.cpp b/src/main.cpp
index 92f43db..18cbf77 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -13,6 +13,9 @@ bool isGeodeTheme(bool forceDisableTheme = false) {
return !forceDisableTheme && Loader::get()->getInstalledMod("geode.loader")->getSettingValue("enable-geode-theme");
}
+// Soooo about the indentations, uh nullptr checking i guess? dont want game to randomly crash!
+// Also getting certain things might be wierd but like i dont wanna make hacky way around a private class and private members
+
void modsLayerModify(CCNode* modsLayer) {
auto mod = Mod::get();
if (auto modListFrame = modsLayer->getChildByID("mod-list-frame")) {
@@ -51,29 +54,31 @@ void modsLayerModify(CCNode* modsLayer) {
if (node->getID() == "ModItem") {
if (auto bg = static_cast(node->getChildByID("bg"))) {
if (mod->getSettingValue("transparent-lists")) {
- if ((bg->getColor() == ccColor3B{255, 255, 255} && bg->getOpacity() == 25) || (bg->getColor() == ccColor3B{0, 0, 0} && bg->getOpacity() == 90)) { // Enabled
+ auto rgb = bg->getColor();
+ auto color = ccColor4B{rgb.b, rgb.g, rgb.b, bg->getOpacity()};
+ if (color == ccColor4B{255, 255, 255, 25} || color == ccColor4B{0, 0, 0, 90}) { // Enabled
bg->setOpacity(isGeodeTheme() ? 50 : 90);
bg->setColor(ccColor3B{0, 0, 0});
}
- else if (bg->getColor() == ccColor3B{153, 245, 245} && bg->getOpacity() == 25) { // Restart Required
+ else if (color == ccColor4B{153, 245, 245, 25}) { // Restart Required
bg->setOpacity(90);
- bg->setColor(ccColor3B{245, 27, 27});
+ bg->setColor(ccColor3B{123, 156, 163});
}
- else if (bg->getColor() == ccColor3B{255, 255, 255} && bg->getOpacity() == 10) { // Disabled
+ else if (color == ccColor4B{255, 255, 255, 10}) { // Disabled
bg->setOpacity(50);
bg->setColor(ccColor3B{205, 205, 205});
}
- else if (bg->getColor() == ccColor3B{235, 35, 112} && bg->getOpacity() == 25) { // Error
+ else if (color == ccColor4B{235, 35, 112, 25}) { // Error
bg->setOpacity(90);
bg->setColor(ccColor3B{245, 27, 27});
}
- else if (bg->getColor() == ccColor3B{245, 153, 245} && bg->getOpacity() == 25) { // Outdated
+ else if (color == ccColor4B{245, 153, 245, 25}) { // Outdated
bg->setOpacity(90);
}
- else if (bg->getColor() == ccColor3B{240, 211, 42} && bg->getOpacity() == 65) { // Featured
+ else if (color == ccColor4B{240, 211, 42, 65}) { // Featured
bg->setOpacity(90);
}
- else if (bg->getColor() == ccColor3B{63, 91, 138} && bg->getOpacity() == 85) { // Modtober
+ else if (color == ccColor4B{63, 91, 138, 85}) { // Modtober
bg->setOpacity(90);
bg->setColor(ccColor3B{32, 102, 220});
}
@@ -86,6 +91,20 @@ void modsLayerModify(CCNode* modsLayer) {
logoSprite->setScale(logoSprite->getScale() == 0.7f ? 0.6f : 0.4f);
}
}
+ if (auto infoContainer = node->getChildByID("info-container")) {
+ if (mod->getSettingValue("fix-mod-info-size")) {
+ auto titleContainer = infoContainer->querySelector("title-container");
+ auto developersMenu = infoContainer->querySelector("developers-menu");
+ if (titleContainer && developersMenu) {
+ infoContainer->setContentWidth(525.f);
+ infoContainer->updateLayout();
+ titleContainer->setContentWidth(525.f);
+ titleContainer->updateLayout();
+ developersMenu->setContentWidth(525.f);
+ developersMenu->updateLayout();
+ }
+ }
+ }
}
}
}
@@ -140,6 +159,8 @@ class $modify(CCScheduler) {
}
};
+// Imagine using geode's little ui events (they also dont work for my problems hehe)
+
/*$execute {
new EventListener>(+[](ModItemUIEvent* event) {
auto mod = Mod::get();