diff --git a/src/EmulationStation.h b/src/EmulationStation.h index 0543d3d54..666fdccd5 100644 --- a/src/EmulationStation.h +++ b/src/EmulationStation.h @@ -6,7 +6,8 @@ #define PROGRAM_VERSION_MINOR 0 #define PROGRAM_VERSION_MAINTENANCE 2 #define PROGRAM_VERSION_REVISION 0 -#define PROGRAM_VERSION_STRING "1.0.2.0 - built " __DATE__ " - " __TIME__ +#define PROGRAM_VERSION_STRING "1.0.2.0" +#define PROGRAM_BUILT_STRING __DATE__ " - " __TIME__ #define RESOURCE_VERSION_STRING "1,0,2,0\0" #define RESOURCE_VERSION PROGRAM_VERSION_MAJOR,PROGRAM_VERSION_MINOR,PROGRAM_VERSION_MAINTENANCE,PROGRAM_VERSION_REVISION diff --git a/src/EmulationStation.rc b/src/EmulationStation.rc index eff407b20..f9d101bdd 100644 --- a/src/EmulationStation.rc +++ b/src/EmulationStation.rc @@ -27,12 +27,12 @@ BEGIN VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "emulationstation.exe\0" VALUE "ProductName", "EmulationStation\0" - VALUE "ProductVersion", RESOURCE_VERSION_STRING + VALUE "ProductVersion", PROGRAM_VERSION_STRING END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 0x407, 1200 + VALUE "Translation", 0x409, 1252 END END diff --git a/src/guis/GuiInputConfig.cpp b/src/guis/GuiInputConfig.cpp index 656e78c27..14f0e6e26 100644 --- a/src/guis/GuiInputConfig.cpp +++ b/src/guis/GuiInputConfig.cpp @@ -92,6 +92,7 @@ GuiInputConfig::GuiInputConfig(Window* window, InputConfig* target, bool reconfi { if(config->isMappedTo("a", input) && input.value) { + mList->stopScrolling(); mConfiguringRow = true; setPress(mapping); return true; @@ -123,7 +124,7 @@ GuiInputConfig::GuiInputConfig(Window* window, InputConfig* target, bool reconfi mHoldingInput = false; - if(assign(input, i)) + if(assign(mHeldInput, i)) rowDone(); // if successful, move cursor/stop configuring - if not, we'll just try again return true; diff --git a/src/guis/GuiMenu.cpp b/src/guis/GuiMenu.cpp index 9f1fa393f..a7ad70abe 100644 --- a/src/guis/GuiMenu.cpp +++ b/src/guis/GuiMenu.cpp @@ -1,3 +1,4 @@ +#include "../EmulationStation.h" #include "GuiMenu.h" #include "../Window.h" #include "../Sound.h" @@ -18,14 +19,17 @@ #include "../scrapers/GamesDBScraper.h" #include "../scrapers/TheArchiveScraper.h" -GuiMenu::GuiMenu(Window* window) : GuiComponent(window), mMenu(window, "MAIN MENU") +GuiMenu::GuiMenu(Window* window) : GuiComponent(window), mMenu(window, "MAIN MENU"), mVersion(window) { - setSize((float)Renderer::getScreenWidth(), (float)Renderer::getScreenHeight()); + // MAIN MENU // SCRAPER > // SOUND SETTINGS > // UI SETTINGS > + // CONFIGURE INPUT > // QUIT > + + // [version] auto openScrapeNow = [this] { mWindow->pushGui(new GuiScraperStart(mWindow)); }; addEntry("SCRAPER", 0x777777FF, true, @@ -170,8 +174,22 @@ GuiMenu::GuiMenu(Window* window) : GuiComponent(window), mMenu(window, "MAIN MEN mWindow->pushGui(s); }); + mVersion.setFont(Font::get(FONT_SIZE_SMALL)); + mVersion.setColor(0xC6C6C6FF); + mVersion.setText("EMULATIONSTATION V" PROGRAM_VERSION_STRING); + mVersion.setAlignment(TextComponent::ALIGN_CENTER); + addChild(&mMenu); - mMenu.setPosition((mSize.x() - mMenu.getSize().x()) / 2, Renderer::getScreenHeight() * 0.15f); + addChild(&mVersion); + + setSize(mMenu.getSize()); + setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, Renderer::getScreenHeight() * 0.15f); +} + +void GuiMenu::onSizeChanged() +{ + mVersion.setSize(mSize.x(), 0); + mVersion.setPosition(0, mSize.y() - mVersion.getSize().y()); } void GuiMenu::addEntry(const char* name, unsigned int color, bool add_arrow, const std::function& func) diff --git a/src/guis/GuiMenu.h b/src/guis/GuiMenu.h index a9f746e38..bf686897e 100644 --- a/src/guis/GuiMenu.h +++ b/src/guis/GuiMenu.h @@ -10,10 +10,12 @@ public: GuiMenu(Window* window); bool input(InputConfig* config, Input input) override; + void onSizeChanged() override; std::vector getHelpPrompts() override; private: void addEntry(const char* name, unsigned int color, bool add_arrow, const std::function& func); MenuComponent mMenu; + TextComponent mVersion; }; diff --git a/src/main.cpp b/src/main.cpp index 73534ad33..96df4d39a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -144,7 +144,7 @@ int main(int argc, char* argv[]) //start the logger Log::open(); - LOG(LogInfo) << "EmulationStation - " << PROGRAM_VERSION_STRING; + LOG(LogInfo) << "EmulationStation - v" << PROGRAM_VERSION_STRING << ", built " << PROGRAM_BUILT_STRING; //always close the log on exit atexit(&onExit);