mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Merge branch 'master' into unstable
This commit is contained in:
commit
919662be85
|
@ -98,7 +98,7 @@ Display tags define some "meta" display attributes about your theme. Display tag
|
|||
|
||||
`<listSelectedColor>` - the hex color to use for selected text on the GuiGameList. Default is zero, which means no change.
|
||||
|
||||
`<listLeftAlign />` - if present, the games list names will be left aligned to the value of `<listOffsetX>` (default 0.5).
|
||||
`<listLeftAlign />` - if present, the games list names will be left aligned to the value of `<listOffsetX>` + `<listTextOffsetX>`. On by default for detailed themes.
|
||||
|
||||
`<hideHeader />` - if present, the system name header won't be displayed (useful for replacing it with an image). If you're making a complete custom theme, you probably want to use this.
|
||||
|
||||
|
|
|
@ -41,11 +41,14 @@ void GuiFastSelect::render()
|
|||
|
||||
mBox->render();
|
||||
|
||||
mTheme->getFastSelectFont()->drawCenteredText(LETTERS.substr(mLetterID, 1), 0, (int)(sh * 0.5f - (mTheme->getFastSelectFont()->getHeight() * 0.5f)), mTextColor);
|
||||
mTheme->getDescriptionFont()->drawCenteredText("Sort order:", 0, (int)(sh * 0.6f - (mTheme->getDescriptionFont()->getHeight() * 0.5f)), mTextColor);
|
||||
std::shared_ptr<Font> letterFont = mTheme->getFastSelectFont();
|
||||
std::shared_ptr<Font> subtextFont = mTheme->getDescriptionFont();
|
||||
|
||||
letterFont->drawCenteredText(LETTERS.substr(mLetterID, 1), 0, (int)(sh * 0.5f - (letterFont->getHeight() * 0.5f)), mTextColor);
|
||||
subtextFont->drawCenteredText("Sort order:", 0, (int)(sh * 0.6f - (subtextFont->getHeight() * 0.5f)), mTextColor);
|
||||
|
||||
std::string sortString = "<- " + mParent->getSortState().description + " ->";
|
||||
mTheme->getDescriptionFont()->drawCenteredText(sortString, 0, (int)(sh * 0.6f + (mTheme->getDescriptionFont()->getHeight() * 0.5f)), mTextColor);
|
||||
subtextFont->drawCenteredText(sortString, 0, (int)(sh * 0.6f + (subtextFont->getHeight() * 0.5f)), mTextColor);
|
||||
}
|
||||
|
||||
bool GuiFastSelect::input(InputConfig* config, Input input)
|
||||
|
|
|
@ -344,6 +344,7 @@ void GuiGameList::updateTheme()
|
|||
}else{
|
||||
mList.setCentered(true);
|
||||
mList.setOffset(0, mList.getOffset().y);
|
||||
mList.setTextOffsetX(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ std::shared_ptr<Font> ThemeComponent::getDescriptionFont()
|
|||
|
||||
std::shared_ptr<Font> ThemeComponent::getFastSelectFont()
|
||||
{
|
||||
if(mFastSelectFont == NULL)
|
||||
if(mFastSelectFont)
|
||||
return mFastSelectFont;
|
||||
else
|
||||
return Font::get(*mWindow->getResourceManager(), Font::getDefaultPath(), FONT_SIZE_LARGE);
|
||||
|
@ -72,10 +72,6 @@ ThemeComponent::ThemeComponent(Window* window) : GuiComponent(window)
|
|||
AudioManager::getInstance()->registerSound(mSoundMap["menuBack"]);
|
||||
AudioManager::getInstance()->registerSound(mSoundMap["menuOpen"]);
|
||||
|
||||
mListFont.reset();
|
||||
mDescFont.reset();
|
||||
mFastSelectFont.reset();
|
||||
|
||||
setDefaults();
|
||||
}
|
||||
|
||||
|
@ -95,7 +91,7 @@ void ThemeComponent::setDefaults()
|
|||
|
||||
mBoolMap["hideHeader"] = false;
|
||||
mBoolMap["hideDividers"] = false;
|
||||
mBoolMap["listCentered"] = true;
|
||||
mBoolMap["listCentered"] = false;
|
||||
|
||||
mFloatMap["listOffsetX"] = 0.5;
|
||||
mFloatMap["listTextOffsetX"] = 0.005f;
|
||||
|
|
Loading…
Reference in a new issue