Skip to content

Commit

Permalink
Fix y position of everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphalaneous committed Oct 22, 2024
1 parent ab429a1 commit 5b815f2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/features/scaling/EditorUIScaling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class $modify(BetterEditButtonBar, EditButtonBar) {
navMenu->setScale(menu->getScale());

float xOffset = (winSize.width / getScale())/2 - 104;
float yOffset = 2;

CCSprite* prevSpr = CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png");
prevSpr->setScale(0.6f);
Expand All @@ -75,10 +74,10 @@ class $modify(BetterEditButtonBar, EditButtonBar) {
CCMenuItemSpriteExtra* nextButton = CCMenuItemSpriteExtra::create(nextSpr, this, menu_selector(EditButtonBar::onRight));

prevButton->setPositionX(menu->getContentWidth()/2 - xOffset);
prevButton->setPositionY((ui->m_toolbarHeight/2 + yOffset) / getScale());
prevButton->setPositionY((ui->m_toolbarHeight/2) / getScale());

nextButton->setPositionX(menu->getContentWidth()/2 + xOffset);
nextButton->setPositionY((ui->m_toolbarHeight/2 + yOffset) / getScale());
nextButton->setPositionY((ui->m_toolbarHeight/2) / getScale());

navMenu->addChild(prevButton);
navMenu->addChild(nextButton);
Expand All @@ -102,7 +101,7 @@ class $modify(BetterEditButtonBar, EditButtonBar) {

buttonMenu->setContentSize({width, height});
buttonMenu->setAnchorPoint({0.5, 1});
buttonMenu->setPositionY(ui->m_toolbarHeight / getScale() - 5);
buttonMenu->setPositionY(ui->m_toolbarHeight / getScale() - 7);
buttonMenu->updateLayout();

float outerWidth = (winSize.width / getScale()) - 235;
Expand Down

0 comments on commit 5b815f2

Please sign in to comment.