fix the stupid misaligned controller button

This commit is contained in:
Cvolton 2024-11-11 21:36:39 +01:00
parent 324883140a
commit f5f336532f
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View file

@ -75,6 +75,7 @@ struct CustomMenuLayer : Modify<CustomMenuLayer, MenuLayer> {
this->fixSocialMenu(); this->fixSocialMenu();
//this code doesnt run have fun figuring out why idc enough
if (auto node = this->getChildByID("settings-gamepad-icon")) { if (auto node = this->getChildByID("settings-gamepad-icon")) {
node->setPositionX( node->setPositionX(
bottomMenu->getChildByID("settings-button")->getPositionX() + winSize.width / 2 bottomMenu->getChildByID("settings-button")->getPositionX() + winSize.width / 2

View file

@ -47,6 +47,11 @@ $register_ids(MenuLayer) {
setIDSafe<CCLabelBMFont>(this, labelOffset++, "player-username"); setIDSafe<CCLabelBMFont>(this, labelOffset++, "player-username");
if(auto node = this->getChildByID("settings-gamepad-icon")) {
// hide it until someone figures out how to bind the positioning to the actual button
node->setVisible(false);
}
// main menu // main menu
if (auto menu = this->getChildByType<CCMenu>(0)) { if (auto menu = this->getChildByType<CCMenu>(0)) {
menu->setID("main-menu"); menu->setID("main-menu");