Commit 45592544 authored by Aloshi's avatar Aloshi

Renamed some theme elements to be more consistent.

Heavily updated the theming documentation.
parent 5606a07f
This diff is collapsed.
......@@ -14,7 +14,7 @@ GuiFastSelect::GuiFastSelect(Window* window, IGameListView* gamelist) : GuiCompo
const std::shared_ptr<ThemeData>& theme = mGameList->getTheme();
using namespace ThemeFlags;
mBackground.applyTheme(theme, "fastSelect", "background", PATH);
mBackground.applyTheme(theme, "fastSelect", "windowBackground", PATH);
mBackground.fitTo(mSize);
addChild(&mBackground);
......
......@@ -38,15 +38,15 @@ GuiMenu::GuiMenu(Window* window) : GuiComponent(window), mBackground(window, ":/
mTheme = ThemeData::getDefault();
using namespace ThemeFlags;
mBackground.applyTheme(mTheme, "menu", "background", PATH);
mBackground.applyTheme(mTheme, "menu", "windowBackground", PATH);
mBackground.fitTo(Eigen::Vector2f(mList.getSize().x(), mSize.y()), Eigen::Vector3f(mList.getPosition().x(), 0, 0));
addChild(&mBackground);
mList.setFont(Font::get((int)(0.09f * Renderer::getScreenHeight())));
mList.applyTheme(mTheme, "menu", "menulist", FONT_PATH | COLOR | SOUND);
mList.setSelectorColor(0xBBBBBBFF);
mList.setColor(0, 0x0000FFFF);
mList.setColor(1, 0xFF0000FF);
mList.applyTheme(mTheme, "menu", "menulist", FONT_PATH | COLOR | SOUND);
Sound::getFromTheme(mTheme, "menu", "menuOpen")->play();
......
......@@ -75,7 +75,7 @@ void DetailedGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& them
BasicGameListView::onThemeChanged(theme);
using namespace ThemeFlags;
mImage.applyTheme(theme, getName(), "gameimage", POSITION | ThemeFlags::SIZE);
mImage.applyTheme(theme, getName(), "md_image", POSITION | ThemeFlags::SIZE);
initMDLabels();
std::vector<TextComponent*> labels = getMDLabels();
......@@ -104,9 +104,9 @@ void DetailedGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& them
values[i]->applyTheme(theme, getName(), valElements[i], ALL ^ ThemeFlags::TEXT);
}
mDescContainer.applyTheme(theme, getName(), "description", POSITION | ThemeFlags::SIZE);
mDescContainer.applyTheme(theme, getName(), "md_description", POSITION | ThemeFlags::SIZE);
mDescription.setSize(mDescContainer.getSize().x(), 0);
mDescription.applyTheme(theme, getName(), "description", FONT_PATH | FONT_SIZE | COLOR);
mDescription.applyTheme(theme, getName(), "md_description", FONT_PATH | FONT_SIZE | COLOR);
}
void DetailedGameListView::initMDLabels()
......
......@@ -26,8 +26,9 @@ ISimpleGameListView::ISimpleGameListView(Window* window, FileData* root) : IGame
void ISimpleGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
{
using namespace ThemeFlags;
mBackground.applyTheme(theme, getName(), "background", PATH);
mHeaderImage.applyTheme(theme, getName(), "header", POSITION | ThemeFlags::SIZE | PATH);
mBackground.applyTheme(theme, getName(), "background", ALL);
mHeaderImage.applyTheme(theme, getName(), "header", ALL);
mHeaderText.applyTheme(theme, getName(), "headerText", ALL);
mThemeExtras.setExtras(ThemeData::makeExtras(theme, getName(), mWindow));
if(mHeaderImage.hasImage())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment