Moved all components into es-core and renamed ScraperSearchComponent to GuiScraperSearch as it's a GUI and not a component.

This commit is contained in:
Leon Styhre 2020-06-06 14:14:13 +02:00
parent 7f39afe3da
commit b7feedd287
16 changed files with 60 additions and 64 deletions

View file

@ -14,11 +14,6 @@ set(ES_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemScreenSaver.h ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemScreenSaver.h
${CMAKE_CURRENT_SOURCE_DIR}/src/CollectionSystemManager.h ${CMAKE_CURRENT_SOURCE_DIR}/src/CollectionSystemManager.h
# GuiComponents
${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScraperSearchComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextListComponent.h
# Guis # Guis
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.h
@ -32,6 +27,7 @@ set(ES_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.h
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInfoPopup.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInfoPopup.h
@ -72,10 +68,6 @@ set(ES_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemScreenSaver.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemScreenSaver.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/CollectionSystemManager.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/CollectionSystemManager.cpp
# GuiComponents
${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScraperSearchComponent.cpp
# Guis # Guis
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiFastSelect.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.cpp
@ -89,6 +81,7 @@ set(ES_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInfoPopup.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInfoPopup.cpp

View file

@ -3,7 +3,7 @@
// //
// Single game scraping user interface. // Single game scraping user interface.
// This interface is triggered from GuiMetaDataEd. // This interface is triggered from GuiMetaDataEd.
// ScraperSearchComponent is called from here. // GuiScraperSearch is called from here.
// //
#include "guis/GuiGameScraper.h" #include "guis/GuiGameScraper.h"
@ -45,9 +45,9 @@ GuiGameScraper::GuiGameScraper(
// Row 4 is a spacer. // Row 4 is a spacer.
// ScraperSearchComponent. // GuiScraperSearch.
mSearch = std::make_shared<ScraperSearchComponent>(window, mSearch = std::make_shared<GuiScraperSearch>(window,
ScraperSearchComponent::NEVER_AUTO_ACCEPT); GuiScraperSearch::NEVER_AUTO_ACCEPT);
mGrid.setEntry(mSearch, Vector2i(0, 5), true); mGrid.setEntry(mSearch, Vector2i(0, 5), true);
// Buttons // Buttons

View file

@ -3,7 +3,7 @@
// //
// Single game scraping user interface. // Single game scraping user interface.
// This interface is triggered from GuiMetaDataEd. // This interface is triggered from GuiMetaDataEd.
// ScraperSearchComponent is called from here. // GuiScraperSearch is called from here.
// //
#pragma once #pragma once
@ -11,7 +11,7 @@
#define ES_APP_GUIS_GUI_GAME_SCRAPER_H #define ES_APP_GUIS_GUI_GAME_SCRAPER_H
#include "components/NinePatchComponent.h" #include "components/NinePatchComponent.h"
#include "components/ScraperSearchComponent.h" #include "guis/GuiScraperSearch.h"
#include "GuiComponent.h" #include "GuiComponent.h"
class GuiGameScraper : public GuiComponent class GuiGameScraper : public GuiComponent
@ -37,7 +37,7 @@ private:
std::shared_ptr<TextComponent> mGameName; std::shared_ptr<TextComponent> mGameName;
std::shared_ptr<TextComponent> mSystemName; std::shared_ptr<TextComponent> mSystemName;
std::shared_ptr<ScraperSearchComponent> mSearch; std::shared_ptr<GuiScraperSearch> mSearch;
std::shared_ptr<ComponentGrid> mButtonGrid; std::shared_ptr<ComponentGrid> mButtonGrid;
ScraperSearchParams mSearchParams; ScraperSearchParams mSearchParams;

View file

@ -4,7 +4,7 @@
// Game metadata edit user interface. // Game metadata edit user interface.
// This interface is triggered from the GuiGamelistOptions menu. // This interface is triggered from the GuiGamelistOptions menu.
// The scraping interface is handled by GuiGameScraper which calls // The scraping interface is handled by GuiGameScraper which calls
// ScraperSearchComponent. // GuiScraperSearch.
// //
#include "guis/GuiMetaDataEd.h" #include "guis/GuiMetaDataEd.h"
@ -286,7 +286,7 @@ void GuiMetaDataEd::fetchDone(const ScraperSearchResult& result)
MetaDataList* metadata = nullptr; MetaDataList* metadata = nullptr;
metadata = new MetaDataList(*mMetaData); metadata = new MetaDataList(*mMetaData);
mMetadataUpdated = ScraperSearchComponent::saveMetadata(result, *metadata); mMetadataUpdated = GuiScraperSearch::saveMetadata(result, *metadata);
// Update the list with the scraped metadata values. // Update the list with the scraped metadata values.
for (unsigned int i = 0; i < mEditors.size(); i++) { for (unsigned int i = 0; i < mEditors.size(); i++) {

View file

@ -4,7 +4,7 @@
// Game metadata edit user interface. // Game metadata edit user interface.
// This interface is triggered from the GuiGamelistOptions menu. // This interface is triggered from the GuiGamelistOptions menu.
// The scraping interface is handled by GuiGameScraper which calls // The scraping interface is handled by GuiGameScraper which calls
// ScraperSearchComponent. // GuiScraperSearch.
// //
#pragma once #pragma once

View file

@ -4,16 +4,16 @@
// Multiple game scraping user interface. // Multiple game scraping user interface.
// Shows the progress for the scraping as it's running. // Shows the progress for the scraping as it's running.
// This interface is triggered from GuiScraperMenu. // This interface is triggered from GuiScraperMenu.
// ScraperSearchComponent is called from here. // GuiScraperSearch is called from here.
// //
#include "guis/GuiScraperMulti.h" #include "guis/GuiScraperMulti.h"
#include "components/ButtonComponent.h" #include "components/ButtonComponent.h"
#include "components/MenuComponent.h" #include "components/MenuComponent.h"
#include "components/ScraperSearchComponent.h"
#include "components/TextComponent.h" #include "components/TextComponent.h"
#include "guis/GuiMsgBox.h" #include "guis/GuiMsgBox.h"
#include "guis/GuiScraperSearch.h"
#include "views/ViewController.h" #include "views/ViewController.h"
#include "Gamelist.h" #include "Gamelist.h"
#include "PowerSaver.h" #include "PowerSaver.h"
@ -55,15 +55,15 @@ GuiScraperMulti::GuiScraperMulti(
Font::get(FONT_SIZE_SMALL), 0x888888FF, ALIGN_CENTER); Font::get(FONT_SIZE_SMALL), 0x888888FF, ALIGN_CENTER);
mGrid.setEntry(mSubtitle, Vector2i(0, 2), false, true); mGrid.setEntry(mSubtitle, Vector2i(0, 2), false, true);
mSearchComp = std::make_shared<ScraperSearchComponent>(mWindow, mSearchComp = std::make_shared<GuiScraperSearch>(mWindow,
approveResults ? ScraperSearchComponent::ALWAYS_ACCEPT_MATCHING_CRC approveResults ? GuiScraperSearch::ALWAYS_ACCEPT_MATCHING_CRC
: ScraperSearchComponent::ALWAYS_ACCEPT_FIRST_RESULT); : GuiScraperSearch::ALWAYS_ACCEPT_FIRST_RESULT);
mSearchComp->setAcceptCallback(std::bind(&GuiScraperMulti::acceptResult, mSearchComp->setAcceptCallback(std::bind(&GuiScraperMulti::acceptResult,
this, std::placeholders::_1)); this, std::placeholders::_1));
mSearchComp->setSkipCallback(std::bind(&GuiScraperMulti::skip, this)); mSearchComp->setSkipCallback(std::bind(&GuiScraperMulti::skip, this));
mSearchComp->setCancelCallback(std::bind(&GuiScraperMulti::finish, this)); mSearchComp->setCancelCallback(std::bind(&GuiScraperMulti::finish, this));
mGrid.setEntry(mSearchComp, Vector2i(0, 3), mSearchComp->getSearchType() != mGrid.setEntry(mSearchComp, Vector2i(0, 3), mSearchComp->getSearchType() !=
ScraperSearchComponent::ALWAYS_ACCEPT_FIRST_RESULT, true); GuiScraperSearch::ALWAYS_ACCEPT_FIRST_RESULT, true);
std::vector< std::shared_ptr<ButtonComponent> > buttons; std::vector< std::shared_ptr<ButtonComponent> > buttons;
@ -136,7 +136,7 @@ void GuiScraperMulti::acceptResult(const ScraperSearchResult& result)
{ {
ScraperSearchParams& search = mSearchQueue.front(); ScraperSearchParams& search = mSearchQueue.front();
ScraperSearchComponent::saveMetadata(result, search.game->metadata); GuiScraperSearch::saveMetadata(result, search.game->metadata);
updateGamelist(search.system); updateGamelist(search.system);

View file

@ -4,7 +4,7 @@
// Multiple game scraping user interface. // Multiple game scraping user interface.
// Shows the progress for the scraping as it's running. // Shows the progress for the scraping as it's running.
// This interface is triggered from GuiScraperMenu. // This interface is triggered from GuiScraperMenu.
// ScraperSearchComponent is called from here. // GuiScraperSearch is called from here.
// //
#pragma once #pragma once
@ -17,7 +17,7 @@
#include "GuiComponent.h" #include "GuiComponent.h"
#include "MetaData.h" #include "MetaData.h"
class ScraperSearchComponent; class GuiScraperSearch;
class TextComponent; class TextComponent;
class GuiScraperMulti : public GuiComponent class GuiScraperMulti : public GuiComponent
@ -53,7 +53,7 @@ private:
std::shared_ptr<TextComponent> mTitle; std::shared_ptr<TextComponent> mTitle;
std::shared_ptr<TextComponent> mSystem; std::shared_ptr<TextComponent> mSystem;
std::shared_ptr<TextComponent> mSubtitle; std::shared_ptr<TextComponent> mSubtitle;
std::shared_ptr<ScraperSearchComponent> mSearchComp; std::shared_ptr<GuiScraperSearch> mSearchComp;
std::shared_ptr<ComponentGrid> mButtonGrid; std::shared_ptr<ComponentGrid> mButtonGrid;
}; };

View file

@ -1,7 +1,7 @@
// //
// ScraperSearchComponent.cpp // GuiScraperSearch.cpp
// //
// User interface component for the scraper where the user is able to see an overview // User interface for the scraper where the user is able to see an overview
// of the game being scraped and an option to override the game search string. // of the game being scraped and an option to override the game search string.
// Used by both single-game scraping from the GuiMetaDataEd menu as well as // Used by both single-game scraping from the GuiMetaDataEd menu as well as
// to resolve scraping conflicts when run from GuiScraperMenu. // to resolve scraping conflicts when run from GuiScraperMenu.
@ -11,7 +11,7 @@
// from GuiScraperMulti for multi-game scraping. // from GuiScraperMulti for multi-game scraping.
// //
#include "components/ScraperSearchComponent.h" #include "guis/GuiScraperSearch.h"
#include "components/ComponentList.h" #include "components/ComponentList.h"
#include "components/DateTimeEditComponent.h" #include "components/DateTimeEditComponent.h"
@ -30,7 +30,7 @@
#include "Log.h" #include "Log.h"
#include "Window.h" #include "Window.h"
ScraperSearchComponent::ScraperSearchComponent( GuiScraperSearch::GuiScraperSearch(
Window* window, Window* window,
SearchType type) SearchType type)
: GuiComponent(window), : GuiComponent(window),
@ -107,7 +107,7 @@ ScraperSearchComponent::ScraperSearchComponent(
updateViewStyle(); updateViewStyle();
} }
void ScraperSearchComponent::onSizeChanged() void GuiScraperSearch::onSizeChanged()
{ {
mGrid.setSize(mSize); mGrid.setSize(mSize);
@ -160,7 +160,7 @@ void ScraperSearchComponent::onSizeChanged()
mBusyAnim.setSize(mSize); mBusyAnim.setSize(mSize);
} }
void ScraperSearchComponent::resizeMetadata() void GuiScraperSearch::resizeMetadata()
{ {
mMD_Grid->setSize(mGrid.getColWidth(2), mGrid.getRowHeight(1)); mMD_Grid->setSize(mGrid.getColWidth(2), mGrid.getRowHeight(1));
if (mMD_Grid->getSize().y() > mMD_Pairs.size()) { if (mMD_Grid->getSize().y() > mMD_Pairs.size()) {
@ -202,7 +202,7 @@ void ScraperSearchComponent::resizeMetadata()
} }
} }
void ScraperSearchComponent::updateViewStyle() void GuiScraperSearch::updateViewStyle()
{ {
// Unlink description, result list and result name. // Unlink description, result list and result name.
mGrid.removeEntry(mResultName); mGrid.removeEntry(mResultName);
@ -242,7 +242,7 @@ void ScraperSearchComponent::updateViewStyle()
} }
} }
void ScraperSearchComponent::search(const ScraperSearchParams& params) void GuiScraperSearch::search(const ScraperSearchParams& params)
{ {
mBlockAccept = true; mBlockAccept = true;
@ -257,7 +257,7 @@ void ScraperSearchComponent::search(const ScraperSearchParams& params)
mSearchHandle = startScraperSearch(params); mSearchHandle = startScraperSearch(params);
} }
void ScraperSearchComponent::stop() void GuiScraperSearch::stop()
{ {
mThumbnailReq.reset(); mThumbnailReq.reset();
mSearchHandle.reset(); mSearchHandle.reset();
@ -266,7 +266,7 @@ void ScraperSearchComponent::stop()
mBlockAccept = false; mBlockAccept = false;
} }
void ScraperSearchComponent::onSearchDone(const std::vector<ScraperSearchResult>& results) void GuiScraperSearch::onSearchDone(const std::vector<ScraperSearchResult>& results)
{ {
mResultList->clear(); mResultList->clear();
@ -322,16 +322,16 @@ void ScraperSearchComponent::onSearchDone(const std::vector<ScraperSearchResult>
} }
void ScraperSearchComponent::onSearchError(const std::string& error) void GuiScraperSearch::onSearchError(const std::string& error)
{ {
LOG(LogInfo) << "ScraperSearchComponent search error: " << error; LOG(LogInfo) << "GuiScraperSearch search error: " << error;
mWindow->pushGui(new GuiMsgBox(mWindow, Utils::String::toUpper(error), mWindow->pushGui(new GuiMsgBox(mWindow, Utils::String::toUpper(error),
"RETRY", std::bind(&ScraperSearchComponent::search, this, mLastSearch), "RETRY", std::bind(&GuiScraperSearch::search, this, mLastSearch),
"SKIP", mSkipCallback, "SKIP", mSkipCallback,
"CANCEL", mCancelCallback)); "CANCEL", mCancelCallback));
} }
int ScraperSearchComponent::getSelectedIndex() int GuiScraperSearch::getSelectedIndex()
{ {
if (!mScraperResults.size() || mGrid.getSelectedComponent() != mResultList) if (!mScraperResults.size() || mGrid.getSelectedComponent() != mResultList)
return -1; return -1;
@ -339,7 +339,7 @@ int ScraperSearchComponent::getSelectedIndex()
return mResultList->getCursorId(); return mResultList->getCursorId();
} }
void ScraperSearchComponent::updateInfoPane() void GuiScraperSearch::updateInfoPane()
{ {
int i = getSelectedIndex(); int i = getSelectedIndex();
if (mSearchType == ALWAYS_ACCEPT_FIRST_RESULT && mScraperResults.size()) if (mSearchType == ALWAYS_ACCEPT_FIRST_RESULT && mScraperResults.size())
@ -405,7 +405,7 @@ void ScraperSearchComponent::updateInfoPane()
} }
} }
bool ScraperSearchComponent::input(InputConfig* config, Input input) bool GuiScraperSearch::input(InputConfig* config, Input input)
{ {
if (config->isMappedTo("a", input) && input.value != 0) { if (config->isMappedTo("a", input) && input.value != 0) {
if (mBlockAccept) if (mBlockAccept)
@ -415,7 +415,7 @@ bool ScraperSearchComponent::input(InputConfig* config, Input input)
return GuiComponent::input(config, input); return GuiComponent::input(config, input);
} }
void ScraperSearchComponent::render(const Transform4x4f& parentTrans) void GuiScraperSearch::render(const Transform4x4f& parentTrans)
{ {
Transform4x4f trans = parentTrans * getTransform(); Transform4x4f trans = parentTrans * getTransform();
@ -429,7 +429,7 @@ void ScraperSearchComponent::render(const Transform4x4f& parentTrans)
} }
} }
void ScraperSearchComponent::returnResult(ScraperSearchResult result) void GuiScraperSearch::returnResult(ScraperSearchResult result)
{ {
mBlockAccept = true; mBlockAccept = true;
@ -443,7 +443,7 @@ void ScraperSearchComponent::returnResult(ScraperSearchResult result)
mAcceptCallback(result); mAcceptCallback(result);
} }
void ScraperSearchComponent::update(int deltaTime) void GuiScraperSearch::update(int deltaTime)
{ {
GuiComponent::update(deltaTime); GuiComponent::update(deltaTime);
@ -530,7 +530,7 @@ void ScraperSearchComponent::update(int deltaTime)
} }
} }
void ScraperSearchComponent::updateThumbnail() void GuiScraperSearch::updateThumbnail()
{ {
if (mThumbnailReq && mThumbnailReq->status() == HttpReq::REQ_SUCCESS) { if (mThumbnailReq && mThumbnailReq->status() == HttpReq::REQ_SUCCESS) {
// Save thumbnail to mScraperResults cache and set the flag that the // Save thumbnail to mScraperResults cache and set the flag that the
@ -569,7 +569,7 @@ void ScraperSearchComponent::updateThumbnail()
} }
} }
void ScraperSearchComponent::openInputScreen(ScraperSearchParams& params) void GuiScraperSearch::openInputScreen(ScraperSearchParams& params)
{ {
auto searchForFunc = [&](const std::string& name) { auto searchForFunc = [&](const std::string& name) {
params.nameOverride = name; params.nameOverride = name;
@ -596,7 +596,7 @@ void ScraperSearchComponent::openInputScreen(ScraperSearchParams& params)
} }
} }
bool ScraperSearchComponent::saveMetadata( bool GuiScraperSearch::saveMetadata(
const ScraperSearchResult& result, MetaDataList& metadata) const ScraperSearchResult& result, MetaDataList& metadata)
{ {
bool mMetadataUpdated = false; bool mMetadataUpdated = false;
@ -651,7 +651,7 @@ bool ScraperSearchComponent::saveMetadata(
return mMetadataUpdated; return mMetadataUpdated;
} }
std::vector<HelpPrompt> ScraperSearchComponent::getHelpPrompts() std::vector<HelpPrompt> GuiScraperSearch::getHelpPrompts()
{ {
std::vector<HelpPrompt> prompts = mGrid.getHelpPrompts(); std::vector<HelpPrompt> prompts = mGrid.getHelpPrompts();
if (getSelectedIndex() != -1) if (getSelectedIndex() != -1)
@ -660,12 +660,12 @@ std::vector<HelpPrompt> ScraperSearchComponent::getHelpPrompts()
return prompts; return prompts;
} }
void ScraperSearchComponent::onFocusGained() void GuiScraperSearch::onFocusGained()
{ {
mGrid.onFocusGained(); mGrid.onFocusGained();
} }
void ScraperSearchComponent::onFocusLost() void GuiScraperSearch::onFocusLost()
{ {
mGrid.onFocusLost(); mGrid.onFocusLost();
} }

View file

@ -1,7 +1,7 @@
// //
// ScraperSearchComponent.h // GuiScraperSearch.h
// //
// User interface component for the scraper where the user is able to see an overview // User interface for the scraper where the user is able to see an overview
// of the game being scraped and an option to override the game search string. // of the game being scraped and an option to override the game search string.
// Used by both single-game scraping from the GuiMetaDataEd menu as well as // Used by both single-game scraping from the GuiMetaDataEd menu as well as
// to resolve scraping conflicts when run from GuiScraperMenu. // to resolve scraping conflicts when run from GuiScraperMenu.
@ -12,8 +12,8 @@
// //
#pragma once #pragma once
#ifndef ES_APP_COMPONENTS_SCRAPER_SEARCH_COMPONENT_H #ifndef ES_APP_GUIS_GUI_SCRAPER_SEARCH_H
#define ES_APP_COMPONENTS_SCRAPER_SEARCH_COMPONENT_H #define ES_APP_GUIS_GUI_SCRAPER_SEARCH_H
#include "components/BusyComponent.h" #include "components/BusyComponent.h"
#include "components/ComponentGrid.h" #include "components/ComponentGrid.h"
@ -27,7 +27,7 @@ class RatingComponent;
class ScrollableContainer; class ScrollableContainer;
class TextComponent; class TextComponent;
class ScraperSearchComponent : public GuiComponent class GuiScraperSearch : public GuiComponent
{ {
public: public:
enum SearchType { enum SearchType {
@ -36,7 +36,7 @@ public:
NEVER_AUTO_ACCEPT NEVER_AUTO_ACCEPT
}; };
ScraperSearchComponent(Window* window, SearchType searchType = NEVER_AUTO_ACCEPT); GuiScraperSearch(Window* window, SearchType searchType = NEVER_AUTO_ACCEPT);
void search(const ScraperSearchParams& params); void search(const ScraperSearchParams& params);
void openInputScreen(ScraperSearchParams& from); void openInputScreen(ScraperSearchParams& from);
@ -125,4 +125,4 @@ private:
BusyComponent mBusyAnim; BusyComponent mBusyAnim;
}; };
#endif // ES_APP_COMPONENTS_SCRAPER_SEARCH_COMPONENT_H #endif // ES_APP_GUIS_GUI_SCRAPER_SEARCH_H

View file

@ -2,7 +2,7 @@
// Scraper.cpp // Scraper.cpp
// //
// Main scraper logic. // Main scraper logic.
// Called from ScraperSearchComponent. // Called from GuiScraperSearch.
// Calls either GamesDBJSONScraper or ScreenScraper. // Calls either GamesDBJSONScraper or ScreenScraper.
// //

View file

@ -2,7 +2,7 @@
// Scraper.h // Scraper.h
// //
// Main scraper logic. // Main scraper logic.
// Called from ScraperSearchComponent. // Called from GuiScraperSearch.
// Calls either GamesDBJSONScraper or ScreenScraper. // Calls either GamesDBJSONScraper or ScreenScraper.
// //

View file

@ -40,11 +40,13 @@ set(CORE_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/OptionListComponent.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/OptionListComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextListComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoComponent.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoPlayerComponent.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoPlayerComponent.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.h ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.h
@ -115,6 +117,7 @@ set(CORE_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageComponent.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageComponent.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.cpp

View file

@ -1,7 +1,7 @@
// //
// AsyncHandle.h // AsyncHandle.h
// //
// Asynchronous operations used by ScraperSearchComponent and Scraper. // Asynchronous operations used by GuiScraperSearch and Scraper.
// //
#pragma once #pragma once