mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 21:55:38 +00:00
Started work on "scrape multiple games" UI.
This commit is contained in:
parent
e247326b51
commit
f3695a7545
|
@ -182,6 +182,7 @@ set(ES_HEADERS
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiInputConfig.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiMenu.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiSettingsMenu.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiScraperStart.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBScraper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/TheArchiveScraper.h
|
||||
|
@ -237,6 +238,7 @@ set(ES_SOURCES
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiInputConfig.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiMenu.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiSettingsMenu.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiScraperStart.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBScraper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/TheArchiveScraper.cpp
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
#include <boost/filesystem.hpp>
|
||||
#include "../Log.h"
|
||||
#include "../Settings.h"
|
||||
|
||||
#include "GuiMetaDataEd.h"
|
||||
#include "GuiScraperStart.h"
|
||||
|
||||
std::vector<FolderData::SortState> GuiGameList::sortStates;
|
||||
|
||||
|
@ -140,6 +142,12 @@ bool GuiGameList::input(InputConfig* config, Input input)
|
|||
return true;
|
||||
}
|
||||
|
||||
if(input.id == SDLK_F5)
|
||||
{
|
||||
mWindow->pushGui(new GuiScraperStart(mWindow));
|
||||
return true;
|
||||
}
|
||||
|
||||
if(config->isMappedTo("a", input) && mFolder->getFileCount() > 0 && input.value != 0)
|
||||
{
|
||||
//play select sound
|
||||
|
|
32
src/components/GuiScraperStart.cpp
Normal file
32
src/components/GuiScraperStart.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include "GuiScraperStart.h"
|
||||
|
||||
GuiScraperStart::GuiScraperStart(Window* window) : GuiComponent(window),
|
||||
mBox(window, ":/frame.png"),
|
||||
mList(window, Eigen::Vector2i(2, 4)),
|
||||
mFilterLabel(mWindow),
|
||||
mSystemsLabel(mWindow),
|
||||
mManualLabel(mWindow),
|
||||
mFiltersOpt(mWindow),
|
||||
mSystemsOpt(mWindow),
|
||||
mManualSwitch(mWindow)
|
||||
{
|
||||
mFilterLabel.setText("Filter: ");
|
||||
mSystemsLabel.setText("Systems: ");
|
||||
mManualLabel.setText("Manual mode: ");
|
||||
|
||||
addChild(&mBox);
|
||||
addChild(&mList);
|
||||
|
||||
using namespace Eigen;
|
||||
mList.setEntry(Vector2i(0, 0), Vector2i(1, 1), &mFilterLabel, false, ComponentListComponent::AlignRight);
|
||||
mList.setEntry(Vector2i(1, 0), Vector2i(1, 1), &mFiltersOpt, true, ComponentListComponent::AlignCenter);
|
||||
|
||||
mList.setEntry(Vector2i(0, 1), Vector2i(1, 1), &mSystemsLabel, false, ComponentListComponent::AlignRight);
|
||||
mList.setEntry(Vector2i(1, 1), Vector2i(1, 1), &mSystemsOpt, true, ComponentListComponent::AlignCenter);
|
||||
|
||||
mList.setEntry(Vector2i(0, 2), Vector2i(1, 1), &mManualLabel, false, ComponentListComponent::AlignRight);
|
||||
mList.setEntry(Vector2i(1, 2), Vector2i(1, 1), &mManualSwitch, true, ComponentListComponent::AlignCenter);
|
||||
|
||||
mBox.fitTo(mList.getSize());
|
||||
}
|
||||
|
36
src/components/GuiScraperStart.h
Normal file
36
src/components/GuiScraperStart.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
|
||||
#include "../GuiComponent.h"
|
||||
#include "../SystemData.h"
|
||||
#include "TextComponent.h"
|
||||
#include "ComponentListComponent.h"
|
||||
#include "OptionListComponent.h"
|
||||
#include "SwitchComponent.h"
|
||||
|
||||
class GuiScraperStart : public GuiComponent
|
||||
{
|
||||
public:
|
||||
GuiScraperStart(Window* window);
|
||||
|
||||
private:
|
||||
NinePatchComponent mBox;
|
||||
ComponentListComponent mList;
|
||||
|
||||
TextComponent mFilterLabel;
|
||||
TextComponent mSystemsLabel;
|
||||
TextComponent mManualLabel;
|
||||
|
||||
OptionListComponent<unsigned int> mFiltersOpt;
|
||||
OptionListComponent<SystemData*> mSystemsOpt;
|
||||
SwitchComponent mManualSwitch;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Filter: [MISSING IMAGES | ALL]
|
||||
Systems: [# selected]
|
||||
Manual Mode: [ON | OFF]
|
||||
GO GO GO
|
||||
|
||||
*/
|
||||
|
Loading…
Reference in a new issue