From 74af419870edce86ec2c8eb1626b1bb13a844869 Mon Sep 17 00:00:00 2001 From: ata Date: Thu, 8 Aug 2024 20:19:30 +1000 Subject: [PATCH 1/2] Remove search prompt im not sure if this would work but it removes the popup saying "Are you sure you would like to search?" or something --- src/SearchHistoryNode.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/SearchHistoryNode.cpp b/src/SearchHistoryNode.cpp index b20988b..886694a 100644 --- a/src/SearchHistoryNode.cpp +++ b/src/SearchHistoryNode.cpp @@ -74,11 +74,7 @@ bool SearchHistoryNode::init(SearchHistoryObject const& object, int index, Searc removeButton->setPosition(queryLabel->getScaledContentSize().width + 120.0f, queryLabel->getPositionY()); buttonMenu->addChild(removeButton); - auto searchButton = CCMenuItemExt::createSpriteExtraWithFrameName("GJ_undoBtn_001.png", 0.6f, [this](auto) { - createQuickPopup("Search", "Are you sure you want to search with this query?", "No", "Yes", [this](auto, bool btn2) { - if (btn2) m_searchCallback(m_object); - }); - }); + auto searchButton = CCMenuItemExt::createSpriteExtraWithFrameName("GJ_undoBtn_001.png", 0.6f, m_searchCallback(m_object)); searchButton->setPosition(queryLabel->getScaledContentSize().width + 150.0f, queryLabel->getPositionY()); buttonMenu->addChild(searchButton); From 99a8633c249ba802686d197db9f476d765dcef75 Mon Sep 17 00:00:00 2001 From: Justin <52604018+hiimjustin000@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:31:08 -0400 Subject: [PATCH 2/2] make it work --- src/SearchHistoryNode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SearchHistoryNode.cpp b/src/SearchHistoryNode.cpp index 886694a..3e51b33 100644 --- a/src/SearchHistoryNode.cpp +++ b/src/SearchHistoryNode.cpp @@ -74,7 +74,7 @@ bool SearchHistoryNode::init(SearchHistoryObject const& object, int index, Searc removeButton->setPosition(queryLabel->getScaledContentSize().width + 120.0f, queryLabel->getPositionY()); buttonMenu->addChild(removeButton); - auto searchButton = CCMenuItemExt::createSpriteExtraWithFrameName("GJ_undoBtn_001.png", 0.6f, m_searchCallback(m_object)); + auto searchButton = CCMenuItemExt::createSpriteExtraWithFrameName("GJ_undoBtn_001.png", 0.6f, [this](auto) { m_searchCallback(m_object); }); searchButton->setPosition(queryLabel->getScaledContentSize().width + 150.0f, queryLabel->getPositionY()); buttonMenu->addChild(searchButton);