Skip to content

Commit 2853c62

Browse files
committed
some adjustments
1 parent 7b14240 commit 2853c62

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/ui/SongListLayer.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#include <Geode/ui/GeodeUI.hpp>
22
#include "SongListLayer.hpp"
33
#include "MLRSongCell.hpp"
4+
#include "SongControlMenu.hpp"
45
#include "../Utils.hpp"
56
#include "../SongControl.hpp"
67
#include "../SongManager.hpp"
78

89
SongListLayer* SongListLayer::create(const std::string& id) {
910
auto* ret = new SongListLayer();
10-
if (ret->initAnchored(420.f, 300.f, id)) {
11+
if (ret->initAnchored(420.f, 290.f, id)) {
1112
ret->autorelease();
1213
return ret;
1314
}
@@ -144,8 +145,8 @@ bool SongListLayer::setup(const std::string&) {
144145

145146
const float sllWidth = scrollLayer->getContentWidth();
146147
constexpr float offset = 25.f;
147-
constexpr float topRowYPos = 28.5f;
148-
constexpr float bottomRowYPos = 17.5f;
148+
constexpr float topRowYPos = 27.5f;
149+
constexpr float bottomRowYPos = 16.5f;
149150
constexpr float arbitraryPaddingValue = 10.f;
150151
constexpr float abridgedControlsMenuYPos = (bottomRowYPos + topRowYPos) / 2.f;
151152

@@ -161,6 +162,7 @@ bool SongListLayer::setup(const std::string&) {
161162
Utils::addButton("shuffle", menu_selector(SongListLayer::onShuffleButton), abridgedControlsMenu, this);
162163
Utils::addButton("copy", menu_selector(SongListLayer::onCopyButton), abridgedControlsMenu, this);
163164
Utils::addButton("prev", menu_selector(SongListLayer::onPreviousButton), abridgedControlsMenu, this);
165+
Utils::addButton("controls", menu_selector(SongListLayer::onControlsButton), abridgedControlsMenu, this);
164166

165167
abridgedControlsMenu->setPosition({layerSize.width / 2.f, abridgedControlsMenuYPos});
166168
abridgedControlsMenu->ignoreAnchorPointForPosition(false);
@@ -185,4 +187,8 @@ void SongListLayer::onCopyButton(CCObject*) {
185187
}
186188
void SongListLayer::onPreviousButton(CCObject*) {
187189
SongControl::previousSong();
190+
}
191+
void SongListLayer::onControlsButton(CCObject*) {
192+
this->onClose(nullptr);
193+
SongControlMenu::create("GJ_square05.png")->show();
188194
}

src/ui/SongListLayer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ class SongListLayer final : public geode::Popup<const std::string&> {
77
void onSettingsButton(CCObject*);
88
void onShuffleButton(CCObject*);
99
void onCopyButton(CCObject*);
10-
void onFavoriteButton(CCObject*);
1110
void onPreviousButton(CCObject*);
11+
void onControlsButton(CCObject*);
1212
};

0 commit comments

Comments
 (0)