From 12ff32b223952a78ea93d46cdf8468782234ea03 Mon Sep 17 00:00:00 2001 From: Cvolton Date: Wed, 3 Jul 2024 12:14:37 +0200 Subject: [PATCH] fix folder label go to folder --- src/hooks/LevelBrowserLayer.cpp | 1 + src/ui/FolderButton.cpp | 4 ++++ src/ui/FolderButton.h | 1 + 3 files changed, 6 insertions(+) diff --git a/src/hooks/LevelBrowserLayer.cpp b/src/hooks/LevelBrowserLayer.cpp index 1bde3d6..3b7332e 100644 --- a/src/hooks/LevelBrowserLayer.cpp +++ b/src/hooks/LevelBrowserLayer.cpp @@ -174,6 +174,7 @@ class BI_DLL }); folderBtn->setDisplayFolder(m_searchObject->m_folder); folderBtn->setIsCreated(m_searchObject->m_searchType == SearchType::MyLists); + folderBtn->setPopupLabel("Go to Folder"); pageMenu->insertBefore(folderBtn, pageMenu->getChildByID("last-page-button")); } diff --git a/src/ui/FolderButton.cpp b/src/ui/FolderButton.cpp index 772b244..573892a 100644 --- a/src/ui/FolderButton.cpp +++ b/src/ui/FolderButton.cpp @@ -35,6 +35,10 @@ void FolderButton::setIsCreated(bool isCreated) { m_isCreated = isCreated; } +void FolderButton::setPopupLabel(std::string_view label) { + m_popupLabel = label; +} + void FolderButton::activate() { CCMenuItemSpriteExtra::activate(); diff --git a/src/ui/FolderButton.h b/src/ui/FolderButton.h index 34ff394..3e143ba 100644 --- a/src/ui/FolderButton.h +++ b/src/ui/FolderButton.h @@ -17,6 +17,7 @@ class BI_DLL FolderButton : public CCMenuItemSpriteExtra, public SetIDPopupDeleg static FolderButton* create(const std::function& callback); void setDisplayFolder(int folderID); void setIsCreated(bool isCreated); + void setPopupLabel(std::string_view label); void activate(); void setIDPopupClosed(SetIDPopup*, int); }; \ No newline at end of file