Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphalaneous committed Jun 7, 2024
1 parent ec47ba2 commit deb2862
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"gd": {
"win": "2.206"
},
"version": "v0.6.0",
"version": "v0.6.1",
"id": "zalphalaneous.minecraft",
"name": "Minecraftify!",
"developer": "Alphalaneous",
Expand Down
2 changes: 2 additions & 0 deletions src/ui/hooks/CreatorLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class $modify(MyCreatorLayer, CreatorLayer){
CCMenu* importantButtonMenu = CCMenu::create();
importantButtonMenu->setContentSize({400, 60});
importantButtonMenu->setPosition({winSize.width/2, winSize.height - 70});
importantButtonMenu->setID("important-menu"_spr);

ColumnLayout* columnLayout = ColumnLayout::create();
columnLayout->setAxis(Axis::Row);
Expand All @@ -63,6 +64,7 @@ class $modify(MyCreatorLayer, CreatorLayer){

minecraftButtonMenu->setContentSize({400, 300});
minecraftButtonMenu->setPosition({winSize.width/2, winSize.height - 170});
minecraftButtonMenu->setID("creator-buttons-menu"_spr);

ColumnLayout* columnLayout2 = ColumnLayout::create();
columnLayout2->setAxis(Axis::Row);
Expand Down
19 changes: 12 additions & 7 deletions src/ui/layers/ExtrasLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,21 @@ bool ExtrasLayer::init() {

CCMenu* gdButtons = CCMenu::create();

ColumnLayout* layout = ColumnLayout::create();
layout->setAxis(Axis::Column);
RowLayout* layout = RowLayout::create();
layout->setAxis(Axis::Row);
layout->setGap(5);
layout->setAxisReverse(true);
layout->setAutoScale(false);
layout->setGrowCrossAxis(true);
gdButtons->setLayout(layout);

gdButtons->setContentSize({350, 100});
gdButtons->setPosition({winSize.width/2, winSize.height-100});

MCButton* dailyChestButton = MCButton::create("Daily Chests", 49.1f, this, menu_selector(MenuLayer::onDaily));
MCButton* achievementsButton = MCButton::create("Achievements", 49.1f, this, menu_selector(MenuLayer::onAchievements));
MCButton* statsButton = MCButton::create("Stats", 49.1f, this, menu_selector(MenuLayer::onStats));
MCButton* newgroundsButton = MCButton::create("Newgrounds", 49.1f, this, menu_selector(ExtrasLayer::onNewgrounds));
MCButton* dailyChestButton = MCButton::create("Daily Chests", 39.1f, this, menu_selector(MenuLayer::onDaily));
MCButton* achievementsButton = MCButton::create("Achievements", 39.1f, this, menu_selector(MenuLayer::onAchievements));
MCButton* statsButton = MCButton::create("Stats", 39.1f, this, menu_selector(MenuLayer::onStats));
MCButton* newgroundsButton = MCButton::create("Newgrounds", 39.1f, this, menu_selector(ExtrasLayer::onNewgrounds));
MCButton* moreGamesButton = MCButton::create("More Games", 39.1f, this, menu_selector(MenuLayer::onMoreGames));

gdButtons->addChild(dailyChestButton);
dailyChestButton->setID("daily-chests-button"_spr);
Expand All @@ -104,6 +106,9 @@ bool ExtrasLayer::init() {
gdButtons->addChild(newgroundsButton);
newgroundsButton->setID("newgrounds-button"_spr);

gdButtons->addChild(moreGamesButton);
moreGamesButton->setID("more-games-button"_spr);

gdButtons->updateLayout();
gdButtons->setID("gd-menu"_spr);

Expand Down

0 comments on commit deb2862

Please sign in to comment.