Added version string to bottom of the menu.

Changed around some version string constants.
Fixed GuiInputConfig assigning "key up" Input instead of the "key down" input (breaks joystick axes, generates warnings).
This commit is contained in:
Aloshi 2014-04-13 19:30:24 -05:00
parent b88e99b9bf
commit fc5ca0019c
6 changed files with 30 additions and 8 deletions

View file

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

View file

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

View file

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

View file

@ -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<void()>& func)

View file

@ -10,10 +10,12 @@ public:
GuiMenu(Window* window);
bool input(InputConfig* config, Input input) override;
void onSizeChanged() override;
std::vector<HelpPrompt> getHelpPrompts() override;
private:
void addEntry(const char* name, unsigned int color, bool add_arrow, const std::function<void()>& func);
MenuComponent mMenu;
TextComponent mVersion;
};

View file

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