Skip to content

Commit f3c2c2d

Browse files
committed
breakeode support
1 parent 4375dbe commit f3c2c2d

4 files changed

Lines changed: 70 additions & 8 deletions

File tree

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- Tweaked charge-up functionality for *Charged Leap* option
33
- Decreased speed multiplier for *Charged Leap* option by `16.7%`
44
- Fix visual bug with fading color progress bars
5+
- Added some helpful buttons to the Horrible Menu credits pop-up!
56

67
# v1.2.1
78
- Raised *Inversed Inputs* option Silly Tier to **Medium**

mod.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"copy-list": "Copy Enabled Options",
9696
"disable-cheats": "Disable Cheats"
9797
},
98-
"description": "Quickly disable every option that is <cr>marked as cheating</c>. <cg>Feel free to do this if *Automatic Safe Mode* is enabled and you're not sure what's triggering it.</c>\n\n> ![**(i)**](frame:GJ_infoIcon_001.png?scale=0.5) <cj>*When reaching support, be sure to copy your currently enabled options list beforehand.*</c>"
98+
"description": "Quickly disable every option that is <cr>marked as cheating</c>. <cg>Feel free to do this if *Automatic Safe Mode* is enabled and you're not sure what's triggering it.</c>\n\n> ![**(i)**](frame:GJ_infoIcon_001.png?scale=0.425) <cj>*Before reaching support, be sure to keep a copy of your currently enabled options list.*</c>"
9999
},
100100
"ui": {
101101
"type": "title",
@@ -128,7 +128,7 @@
128128
"theme-background": {
129129
"type": "file",
130130
"name": "Menu Theme Background",
131-
"description": "Local image file to use as a semi-transparent background image for the <cg>Horrible Options</c> menu interface. <co>Selected image will be stretched to fit the menu window's size.</c>\n\n> ![**(o)**](frame:collaborationIcon_001.png) <cg>*To load animated images, first install [ImagePlus](mod:prevter.imageplus).*</c>\n\n<mod:prevter.imageplus>",
131+
"description": "Local image file to use as a semi-transparent background image for the <cg>Horrible Options</c> menu interface. <co>Selected image will be stretched to fit the menu window's size.</c>\n\n> ![**(o)**](frame:collaborationIcon_001.png?scale=0.95) <cg>*To load animated images, first install [ImagePlus](mod:prevter.imageplus).*</c>\n\n<mod:prevter.imageplus>",
132132
"default": "",
133133
"control": {
134134
"dialog": "open",

src/ui/MenuCredits.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ namespace horrible {
2424
int glowColor;
2525
};
2626

27+
struct ResourceButton final {
28+
const char* id;
29+
const char* label;
30+
geode::Button::ButtonCallback callback;
31+
};
32+
2733
private:
2834
static MenuCredits* s_inst;
2935

src/ui/src/MenuCredits.cpp

Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ bool MenuCredits::init(ZStringView theme) {
7474
auto leadDevLabel = CCLabelBMFont::create("Lead Developers", font::big);
7575
leadDevLabel->setID("lead-dev-label");
7676
leadDevLabel->setScale(0.425f);
77-
leadDevLabel->setAnchorPoint(anchor::center);
78-
leadDevLabel->setPosition({m_mainLayer->getScaledContentWidth() / 2.f, (m_mainLayer->getScaledContentHeight() / 2.f) + 91.25f});
77+
leadDevLabel->setAnchorPoint({0, 0.5});
78+
leadDevLabel->setPosition({30.f, (m_mainLayer->getScaledContentHeight() / 2.f) + 91.25f});
7979

8080
m_mainLayer->addChild(leadDevLabel);
8181

@@ -86,8 +86,7 @@ bool MenuCredits::init(ZStringView theme) {
8686

8787
auto leadDevContainer = CCNode::create();
8888
leadDevContainer->setID("lead-dev-container");
89-
leadDevContainer->setAnchorPoint(anchor::center);
90-
leadDevContainer->setPosition({m_mainLayer->getScaledContentWidth() / 2.f, leadDevLabel->getPositionY() - 35.f});
89+
leadDevContainer->setAnchorPoint({anchor::center});
9190
leadDevContainer->setLayout(leadDevContainerLayout);
9291

9392
constexpr LeadDevIcon devs[] = {
@@ -122,16 +121,72 @@ bool MenuCredits::init(ZStringView theme) {
122121

123122
leadDevContainer->updateLayout();
124123

124+
leadDevContainer->setPosition({2.5f + leadDevLabel->getPositionX() + (leadDevContainer->getScaledContentWidth() / 2.f), leadDevLabel->getPositionY() - 35.f});
125+
125126
auto leadDevContainerBg = cue::createBackground(
126127
{leadDevContainer->getScaledContentWidth() + 10.f, leadDevContainer->getScaledContentHeight() + 6.25f},
127128
{
128129
.zOrder = 0,
129-
.id = "lead-dev-container-bg",
130+
.id = "",
130131
});
131132
leadDevContainerBg->setPosition(leadDevContainer->getPosition());
132133

133134
m_mainLayer->addChild(leadDevContainerBg);
134135

136+
auto resrcBtnContainerLayout = RowLayout::create()
137+
->setGap(2.5f)
138+
->setAutoScale(false)
139+
->setGrowCrossAxis(true);
140+
141+
auto resrcBtnContainer = CCNode::create();
142+
resrcBtnContainer->setID("resources-container");
143+
resrcBtnContainer->setAnchorPoint({0, 0.5});
144+
resrcBtnContainer->setContentSize({m_mainLayer->getScaledContentWidth() - 198.75f, leadDevContainer->getScaledContentHeight()});
145+
resrcBtnContainer->setPosition({leadDevContainer->getPositionX() + (leadDevContainerBg->getScaledContentWidth() / 2.f) + 8.75f, leadDevContainer->getPositionY()});
146+
resrcBtnContainer->setLayout(resrcBtnContainerLayout);
147+
148+
m_mainLayer->addChild(resrcBtnContainer, 9);
149+
150+
auto resrcBtns = std::to_array<ResourceButton>({
151+
{
152+
"breakeode-support-btn",
153+
"Need Help?",
154+
[](auto) {
155+
createQuickPopup(
156+
"Breakeode Support",
157+
"If <cg>Horrible Menu</c> <cy>is causing issues</c>, you may reach out to the <cl>Breakeode</c> development team by <cy>creating a ticket in their support server</c>. If you have any other questions, feel free to ask!\n\n"
158+
"Would you like to join <cl>Breakeode</c>'s support Discord server?",
159+
"Cancel",
160+
"OK",
161+
[](auto, bool ok) {
162+
if (ok) web::openLinkInBrowser("https://dsc.gg/breakeode");
163+
});
164+
},
165+
},
166+
{
167+
"changelog-btn",
168+
"What's New?",
169+
[](auto) {
170+
openChangelogPopup(mod);
171+
},
172+
},
173+
});
174+
175+
for (auto& b : resrcBtns) {
176+
auto btn = Button::createWithNode(
177+
ButtonSprite::create(
178+
b.label,
179+
font::gold,
180+
themes::getButtonSquareSprite(theme)),
181+
std::move(b.callback));
182+
btn->setID(b.id);
183+
btn->setScale(0.75f);
184+
185+
resrcBtnContainer->addChild(btn);
186+
};
187+
188+
resrcBtnContainer->updateLayout();
189+
135190
auto creditsMd = MDTextArea::create(
136191
"# ![🛠](frame:GJ_hammerIcon_001.png?scale=0.875) Resources\n"
137192
"**[alk1m123](user:11535118)**: '*[Sapphire SDK](https://www.x.com/GeodeSDK/status/2039225279353176398/)*' logo\n\n"
@@ -158,7 +213,7 @@ bool MenuCredits::init(ZStringView theme) {
158213
[](auto) {
159214
createQuickPopup(
160215
"Breakeode",
161-
"Visit <cr>Breakeode</c>'s official website?",
216+
"Visit <cl>Breakeode</c>'s official website?",
162217
"Cancel",
163218
"OK",
164219
[](auto, bool ok) {

0 commit comments

Comments
 (0)