Started work on "scrape multiple games" UI.

This commit is contained in:
Aloshi 2013-10-10 16:49:59 -05:00
parent e247326b51
commit f3695a7545
4 changed files with 78 additions and 0 deletions

View file

@ -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

View file

@ -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

View 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());
}

View 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
*/