mirror of
https://github.com/RetroPie/EmulationStation.git
synced 2024-05-31 18:47:42 -04:00
Merge branch 'master' into gamelistdb
Conflicts: es-app/src/guis/GuiGamelistOptions.cpp
This commit is contained in:
commit
7635f11f92
Binary file not shown.
|
@ -4,10 +4,10 @@
|
|||
// Do this version number update as the very last commit for the new release version.
|
||||
#define PROGRAM_VERSION_MAJOR 2
|
||||
#define PROGRAM_VERSION_MINOR 0
|
||||
#define PROGRAM_VERSION_MAINTENANCE 0
|
||||
#define PROGRAM_VERSION_STRING "2.0.0-rc1"
|
||||
#define PROGRAM_VERSION_MAINTENANCE 1
|
||||
#define PROGRAM_VERSION_STRING "2.0.1"
|
||||
|
||||
#define PROGRAM_BUILT_STRING __DATE__ " - " __TIME__
|
||||
|
||||
#define RESOURCE_VERSION_STRING "2,0,0\0"
|
||||
#define RESOURCE_VERSION_STRING "2,0,1\0"
|
||||
#define RESOURCE_VERSION PROGRAM_VERSION_MAJOR,PROGRAM_VERSION_MINOR,PROGRAM_VERSION_MAINTENANCE
|
||||
|
|
|
@ -18,9 +18,7 @@ GuiGamelistOptions::GuiGamelistOptions(Window* window, SystemData* system) : Gui
|
|||
|
||||
mJumpToLetterList = std::make_shared<LetterList>(mWindow, "JUMP TO LETTER", false);
|
||||
for(char c = 'A'; c <= 'Z'; c++)
|
||||
{
|
||||
mJumpToLetterList->add(std::string(1, c), c, c == curChar);
|
||||
}
|
||||
|
||||
ComponentListRow row;
|
||||
row.addElement(std::make_shared<TextComponent>(mWindow, "JUMP TO LETTER", Font::get(FONT_SIZE_MEDIUM), 0x777777FF), true);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
DateTimeComponent::DateTimeComponent(Window* window, DisplayMode dispMode) : GuiComponent(window),
|
||||
mEditing(false), mEditIndex(0), mDisplayMode(dispMode), mRelativeUpdateAccumulator(0),
|
||||
mColor(0x777777FF), mFont(Font::get(FONT_SIZE_SMALL, FONT_PATH_LIGHT)), mUppercase(false), mSizeSet(false)
|
||||
mColor(0x777777FF), mFont(Font::get(FONT_SIZE_SMALL, FONT_PATH_LIGHT)), mUppercase(false), mAutoSize(true)
|
||||
{
|
||||
updateTextCache();
|
||||
}
|
||||
|
@ -54,9 +54,9 @@ bool DateTimeComponent::input(InputConfig* config, Input input)
|
|||
}
|
||||
|
||||
int incDir = 0;
|
||||
if(config->isMappedTo("up", input))
|
||||
if(config->isMappedTo("up", input) || config->isMappedTo("pageup", input))
|
||||
incDir = 1;
|
||||
else if(config->isMappedTo("down", input))
|
||||
else if(config->isMappedTo("down", input) || config->isMappedTo("pagedown", input))
|
||||
incDir = -1;
|
||||
|
||||
if(incDir != 0)
|
||||
|
@ -253,8 +253,12 @@ void DateTimeComponent::updateTextCache()
|
|||
std::shared_ptr<Font> font = getFont();
|
||||
mTextCache = std::unique_ptr<TextCache>(font->buildTextCache(dispString, 0, 0, mColor));
|
||||
|
||||
if(!mSizeSet)
|
||||
if(mAutoSize)
|
||||
{
|
||||
mSize = mTextCache->metrics.size;
|
||||
if(getParent())
|
||||
getParent()->onSizeChanged();
|
||||
}
|
||||
|
||||
//set up cursor positions
|
||||
mCursorBoxes.clear();
|
||||
|
@ -298,7 +302,6 @@ void DateTimeComponent::setFont(std::shared_ptr<Font> font)
|
|||
|
||||
void DateTimeComponent::onSizeChanged()
|
||||
{
|
||||
mSizeSet = true;
|
||||
updateTextCache();
|
||||
}
|
||||
|
||||
|
@ -310,14 +313,20 @@ void DateTimeComponent::setUppercase(bool uppercase)
|
|||
|
||||
void DateTimeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme, const std::string& view, const std::string& element, unsigned int properties)
|
||||
{
|
||||
GuiComponent::applyTheme(theme, view, element, properties);
|
||||
|
||||
using namespace ThemeFlags;
|
||||
|
||||
const ThemeData::ThemeElement* elem = theme->getElement(view, element, "datetime");
|
||||
if(!elem)
|
||||
return;
|
||||
|
||||
// We set mAutoSize BEFORE calling GuiComponent::applyTheme because it calls
|
||||
// setSize(), which will call updateTextCache(), which will reset mSize if
|
||||
// mAutoSize == true, ignoring the theme's value.
|
||||
if(properties & ThemeFlags::SIZE)
|
||||
mAutoSize = !elem->has("size");
|
||||
|
||||
GuiComponent::applyTheme(theme, view, element, properties);
|
||||
|
||||
using namespace ThemeFlags;
|
||||
|
||||
if(properties & COLOR && elem->has("color"))
|
||||
setColor(elem->get<unsigned int>("color"));
|
||||
|
||||
|
|
|
@ -62,5 +62,5 @@ private:
|
|||
std::shared_ptr<Font> mFont;
|
||||
bool mUppercase;
|
||||
|
||||
bool mSizeSet;
|
||||
bool mAutoSize;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue