Skip to content

Commit

Permalink
fix folder label go to folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Jul 3, 2024
1 parent 2cb32f5 commit 12ff32b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/hooks/LevelBrowserLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
Expand Down
4 changes: 4 additions & 0 deletions src/ui/FolderButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
1 change: 1 addition & 0 deletions src/ui/FolderButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class BI_DLL FolderButton : public CCMenuItemSpriteExtra, public SetIDPopupDeleg
static FolderButton* create(const std::function<void(int)>& callback);
void setDisplayFolder(int folderID);
void setIsCreated(bool isCreated);
void setPopupLabel(std::string_view label);
void activate();
void setIDPopupClosed(SetIDPopup*, int);
};

0 comments on commit 12ff32b

Please sign in to comment.