-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed the mod for the newest geode beta
- Loading branch information
1 parent
8206056
commit fd3c9aa
Showing
2 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/** | ||
* Include the Geode headers. | ||
*/ | ||
#include <Geode/Geode.hpp> | ||
/** | ||
* Required to modify the MenuLayer class | ||
*/ | ||
#include <Geode/modify/MenuLayer.hpp> | ||
|
||
/** | ||
* Brings cocos2d and all Geode namespaces | ||
* to the current scope. | ||
*/ | ||
using namespace geode::prelude; | ||
|
||
/** | ||
* Allows you to modify the MenuLayer | ||
*/ | ||
class $modify(MenuLayer) { | ||
bool init() { | ||
if(!MenuLayer::init()) return false; | ||
|
||
// Gets the social-media-menu child from the MenuLayer | ||
auto socialmediamenu = this->getChildByID("social-media-menu"); | ||
|
||
// Removes the child robtop-logo-button from the socialmediamenu | ||
socialmediamenu->removeChildByID("robtop-logo-button"); | ||
|
||
// Gets the twitch button child from the socialmediamenu | ||
auto twitchbutton = socialmediamenu->getChildByID("twitch-button"); | ||
|
||
// Gets the discord button child from the socialmediamenu | ||
auto discordbutton = socialmediamenu->getChildByID("discord-button"); | ||
|
||
// Gets the youtube button child from the socialmediamenu | ||
auto youtubebutton = socialmediamenu->getChildByID("youtube-button"); | ||
|
||
// Gets the facebook button child from the socialmediamenu | ||
auto facebookbutton = socialmediamenu->getChildByID("facebook-button"); | ||
|
||
|
||
if (Mod::get()->getSettingValue<bool>("switch-discord-twitch")) { | ||
if (Mod::get()->getSettingValue<bool>("switch-discord-twitch")) | ||
// Sets the discord button to X: 99, Y: 68.6 | ||
discordbutton->setPosition(99, 68.6); | ||
|
||
// Lowers the scale of the socialmediamenu | ||
socialmediamenu->setScale(0.9); | ||
|
||
// Sets the position to X: 9, Y: -15 | ||
socialmediamenu->setPosition(9, -15); | ||
return true; | ||
// Sets the position to X: 128, Y: 39.6 | ||
discordbutton->setPosition(128, 39.6); | ||
|
||
// Finally sets the twitch button to X: 99, Y: 39.6 | ||
twitchbutton->setPosition(99, 39.6); | ||
|
||
// Lowers the scale of the socialmediamenu | ||
socialmediamenu->setScale(0.9); | ||
|
||
// Sets the position to X: 9, Y: -15 | ||
socialmediamenu->setPosition(9, -15); | ||
|
||
// Sets the Y position of the youtube button to 39.6 | ||
youtubebutton->setPositionY(39.6); | ||
|
||
// Sets the Y position of the facebook button to 39.6 | ||
facebookbutton->setPositionY(39.6); | ||
|
||
return true; | ||
} else { | ||
twitchbutton->setPosition(128, 39.6); | ||
|
||
discordbutton->setPosition(99, 39.6); | ||
|
||
// Lowers the scale of the socialmediamenu | ||
socialmediamenu->setScale(0.9); | ||
|
||
// Sets the position to X: 9, Y: -15 | ||
socialmediamenu->setPosition(9, -15); | ||
|
||
// Sets the Y position of the youtube button to 39.6 | ||
youtubebutton->setPositionY(39.6); | ||
|
||
// Sets the Y position of the facebook button to 39.6 | ||
facebookbutton->setPositionY(39.6); | ||
|
||
|
||
if (Mod::get()->getSettingValue<bool>("put-twitch-logo-ontop")) { | ||
twitchbutton->setPosition(99, 68.6); | ||
} | ||
return true; | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters