Merge pull request #3211 from JosJuice/themes-to-resources
Move nobanner and fileplatform from Themes to Resources
Before Width: | Height: | Size: 278 B After Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 553 B After Width: | Height: | Size: 553 B |
Before Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 553 B |
Before Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 553 B |
Before Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 553 B |
|
@ -69,6 +69,7 @@
|
||||||
#define SHADERS_DIR "Shaders"
|
#define SHADERS_DIR "Shaders"
|
||||||
#define WII_SYSCONF_DIR "shared2" DIR_SEP "sys"
|
#define WII_SYSCONF_DIR "shared2" DIR_SEP "sys"
|
||||||
#define WII_WC24CONF_DIR "shared2" DIR_SEP "wc24"
|
#define WII_WC24CONF_DIR "shared2" DIR_SEP "wc24"
|
||||||
|
#define RESOURCES_DIR "Resources"
|
||||||
#define THEMES_DIR "Themes"
|
#define THEMES_DIR "Themes"
|
||||||
#define ANAGLYPH_DIR "Anaglyph"
|
#define ANAGLYPH_DIR "Anaglyph"
|
||||||
#define PIPES_DIR "Pipes"
|
#define PIPES_DIR "Pipes"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
|
#include "Common/CommonPaths.h"
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
|
|
||||||
|
@ -17,7 +18,7 @@ QVector<QPixmap> Resources::m_pixmaps;
|
||||||
|
|
||||||
void Resources::Init()
|
void Resources::Init()
|
||||||
{
|
{
|
||||||
QString dir = QString::fromStdString(File::GetSysDirectory() + "Resources/");
|
QString dir = QString::fromStdString(File::GetSysDirectory() + RESOURCES_DIR + DIR_SEP);
|
||||||
|
|
||||||
m_regions.resize(DiscIO::IVolume::NUMBER_OF_COUNTRIES);
|
m_regions.resize(DiscIO::IVolume::NUMBER_OF_COUNTRIES);
|
||||||
m_regions[DiscIO::IVolume::COUNTRY_JAPAN].load(GetImageFilename("Flag_Japan", dir));
|
m_regions[DiscIO::IVolume::COUNTRY_JAPAN].load(GetImageFilename("Flag_Japan", dir));
|
||||||
|
@ -40,6 +41,7 @@ void Resources::Init()
|
||||||
m_platforms[0].load(GetImageFilename("Platform_Gamecube", dir));
|
m_platforms[0].load(GetImageFilename("Platform_Gamecube", dir));
|
||||||
m_platforms[1].load(GetImageFilename("Platform_Wii", dir));
|
m_platforms[1].load(GetImageFilename("Platform_Wii", dir));
|
||||||
m_platforms[2].load(GetImageFilename("Platform_Wad", dir));
|
m_platforms[2].load(GetImageFilename("Platform_Wad", dir));
|
||||||
|
m_platforms[3].load(GetImageFilename("Platform_File", dir));
|
||||||
|
|
||||||
m_ratings.resize(6);
|
m_ratings.resize(6);
|
||||||
m_ratings[0].load(GetImageFilename("rating0", dir));
|
m_ratings[0].load(GetImageFilename("rating0", dir));
|
||||||
|
@ -52,6 +54,7 @@ void Resources::Init()
|
||||||
m_pixmaps.resize(NUM_ICONS);
|
m_pixmaps.resize(NUM_ICONS);
|
||||||
m_pixmaps[DOLPHIN_LOGO].load(GetImageFilename("Dolphin", dir));
|
m_pixmaps[DOLPHIN_LOGO].load(GetImageFilename("Dolphin", dir));
|
||||||
m_pixmaps[DOLPHIN_LOGO_LARGE].load(GetImageFilename("dolphin_logo", dir));
|
m_pixmaps[DOLPHIN_LOGO_LARGE].load(GetImageFilename("dolphin_logo", dir));
|
||||||
|
m_pixmaps[BANNER_MISSING].load(GetImageFilename("nobanner", dir));
|
||||||
UpdatePixmaps();
|
UpdatePixmaps();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,12 +72,9 @@ void Resources::UpdatePixmaps()
|
||||||
m_pixmaps[TOOLBAR_CONFIGURE].load(GetImageFilename("config", dir));
|
m_pixmaps[TOOLBAR_CONFIGURE].load(GetImageFilename("config", dir));
|
||||||
m_pixmaps[TOOLBAR_GRAPHICS].load(GetImageFilename("graphics", dir));
|
m_pixmaps[TOOLBAR_GRAPHICS].load(GetImageFilename("graphics", dir));
|
||||||
m_pixmaps[TOOLBAR_CONTROLLERS].load(GetImageFilename("classic", dir));
|
m_pixmaps[TOOLBAR_CONTROLLERS].load(GetImageFilename("classic", dir));
|
||||||
m_pixmaps[TOOLBAR_HELP].load(GetImageFilename("nobanner", dir)); // TODO
|
m_pixmaps[TOOLBAR_HELP].load(GetImageFilename("config", dir)); // TODO
|
||||||
// TODO: toolbar[MEMCARD];
|
// TODO: toolbar[MEMCARD];
|
||||||
// TODO: toolbar[HOTKEYS];
|
// TODO: toolbar[HOTKEYS];
|
||||||
m_pixmaps[BANNER_MISSING].load(GetImageFilename("nobanner", dir));
|
|
||||||
// TODO: Make this consistent with the other files
|
|
||||||
m_platforms[3].load(GetImageFilename("fileplatform", dir));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Resources::GetImageFilename(const char* name, QString dir)
|
QString Resources::GetImageFilename(const char* name, QString dir)
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
#include "Common/CommonPaths.h"
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "DolphinQt2/Resources.h"
|
#include "DolphinQt2/Resources.h"
|
||||||
|
@ -15,13 +16,13 @@ QList<QPixmap> Resources::m_misc;
|
||||||
|
|
||||||
void Resources::Init()
|
void Resources::Init()
|
||||||
{
|
{
|
||||||
QString sys_dir = QString::fromStdString(File::GetSysDirectory() + "Resources/");
|
QString sys_dir = QString::fromStdString(File::GetSysDirectory() + RESOURCES_DIR + DIR_SEP);
|
||||||
|
|
||||||
QStringList platforms{
|
QStringList platforms{
|
||||||
QStringLiteral("Platform_Gamecube.png"),
|
QStringLiteral("Platform_Gamecube.png"),
|
||||||
QStringLiteral("Platform_Wii.png"),
|
QStringLiteral("Platform_Wii.png"),
|
||||||
QStringLiteral("Platform_Wad.png"),
|
QStringLiteral("Platform_Wad.png"),
|
||||||
QStringLiteral("Platform_Wii.png")
|
QStringLiteral("Platform_File.png")
|
||||||
};
|
};
|
||||||
for (QString platform : platforms)
|
for (QString platform : platforms)
|
||||||
m_platforms.append(QPixmap(platform.prepend(sys_dir)));
|
m_platforms.append(QPixmap(platform.prepend(sys_dir)));
|
||||||
|
@ -56,10 +57,9 @@ void Resources::Init()
|
||||||
for (QString rating : ratings)
|
for (QString rating : ratings)
|
||||||
m_ratings.append(QPixmap(rating.prepend(sys_dir)));
|
m_ratings.append(QPixmap(rating.prepend(sys_dir)));
|
||||||
|
|
||||||
QString theme_dir = QString::fromStdString(File::GetThemeDir(SConfig::GetInstance().theme_name));
|
m_misc.append(QPixmap(QStringLiteral("nobanner.png").prepend(sys_dir)));
|
||||||
m_misc.append(QPixmap(QStringLiteral("nobanner.png").prepend(theme_dir)));
|
m_misc.append(QPixmap(QStringLiteral("dolphin_logo.png").prepend(sys_dir)));
|
||||||
m_misc.append(QPixmap(QStringLiteral("dolphin_logo.png").prepend(theme_dir)));
|
m_misc.append(QPixmap(QStringLiteral("Dolphin.png").prepend(sys_dir)));
|
||||||
m_misc.append(QPixmap(QStringLiteral("Dolphin.png").prepend(theme_dir)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QPixmap Resources::GetPlatform(int platform)
|
QPixmap Resources::GetPlatform(int platform)
|
||||||
|
|
|
@ -197,7 +197,7 @@ void CGameListCtrl::InitBitmaps()
|
||||||
m_PlatformImageIndex[0] = m_imageListSmall->Add(wxBitmap(Platform_Gamecube_xpm));
|
m_PlatformImageIndex[0] = m_imageListSmall->Add(wxBitmap(Platform_Gamecube_xpm));
|
||||||
m_PlatformImageIndex[1] = m_imageListSmall->Add(wxBitmap(Platform_Wii_xpm));
|
m_PlatformImageIndex[1] = m_imageListSmall->Add(wxBitmap(Platform_Wii_xpm));
|
||||||
m_PlatformImageIndex[2] = m_imageListSmall->Add(wxBitmap(Platform_Wad_xpm));
|
m_PlatformImageIndex[2] = m_imageListSmall->Add(wxBitmap(Platform_Wad_xpm));
|
||||||
m_PlatformImageIndex[3] = m_imageListSmall->Add(wxBitmap(StrToWxStr(File::GetThemeDir(SConfig::GetInstance().theme_name) + "fileplatform.png"), wxBITMAP_TYPE_PNG));
|
m_PlatformImageIndex[3] = m_imageListSmall->Add(wxBitmap(StrToWxStr(File::GetSysDirectory() + RESOURCES_DIR + DIR_SEP + "Platform_File.png"), wxBITMAP_TYPE_PNG));
|
||||||
|
|
||||||
m_EmuStateImageIndex.resize(6);
|
m_EmuStateImageIndex.resize(6);
|
||||||
m_EmuStateImageIndex[0] = m_imageListSmall->Add(wxBitmap(rating_0));
|
m_EmuStateImageIndex[0] = m_imageListSmall->Add(wxBitmap(rating_0));
|
||||||
|
|
|
@ -176,7 +176,7 @@ GameListItem::GameListItem(const std::string& _rFileName, const std::unordered_m
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback in case no banner is available.
|
// Fallback in case no banner is available.
|
||||||
ReadPNGBanner(File::GetThemeDir(SConfig::GetInstance().theme_name) + "nobanner.png");
|
ReadPNGBanner(File::GetSysDirectory() + RESOURCES_DIR + DIR_SEP + "nobanner.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
GameListItem::~GameListItem()
|
GameListItem::~GameListItem()
|
||||||
|
|