themes directory stuffs

This commit is contained in:
Jordan Woyak 2013-01-13 14:06:15 -06:00
parent 0c95673478
commit 6f7b11b9be
6 changed files with 7 additions and 1 deletions

View File

@ -89,6 +89,7 @@
#define MAIL_LOGS_DIR LOGS_DIR DIR_SEP "Mail"
#define SHADERS_DIR "Shaders"
#define WII_SYSCONF_DIR "shared2" DIR_SEP "sys"
#define THEMES_DIR "Themes"
// Filenames
// Files in the directory returned by GetUserPath(D_CONFIG_IDX)

View File

@ -678,6 +678,7 @@ std::string &GetUserPath(const unsigned int DirIDX, const std::string &newPath)
paths[D_DUMPDSP_IDX] = paths[D_USER_IDX] + DUMP_DSP_DIR DIR_SEP;
paths[D_LOGS_IDX] = paths[D_USER_IDX] + LOGS_DIR DIR_SEP;
paths[D_MAILLOGS_IDX] = paths[D_USER_IDX] + MAIL_LOGS_DIR DIR_SEP;
paths[D_THEMES_IDX] = paths[D_USER_IDX] + THEMES_DIR DIR_SEP;
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR DIR_SEP;
paths[F_DOLPHINCONFIG_IDX] = paths[D_CONFIG_IDX] + DOLPHIN_CONFIG;
paths[F_DSPCONFIG_IDX] = paths[D_CONFIG_IDX] + DSP_CONFIG;

View File

@ -50,6 +50,7 @@ enum {
D_LOGS_IDX,
D_MAILLOGS_IDX,
D_WIISYSCONF_IDX,
D_THEMES_IDX,
F_DOLPHINCONFIG_IDX,
F_DSPCONFIG_IDX,
F_DEBUGGERCONFIG_IDX,

View File

@ -174,6 +174,7 @@ void SConfig::SaveSettings()
ini.Set("Interface", "ShowLogWindow", m_InterfaceLogWindow);
ini.Set("Interface", "ShowLogConfigWindow", m_InterfaceLogConfigWindow);
ini.Set("Interface", "ShowConsole", m_InterfaceConsole);
ini.Set("Interface", "ThemeName", m_LocalCoreStartupParameter.theme_name);
// Hotkeys
for (int i = 0; i < NUM_HOTKEYS; i++)
@ -311,6 +312,7 @@ void SConfig::LoadSettings()
ini.Get("Interface", "ShowLogWindow", &m_InterfaceLogWindow, false);
ini.Get("Interface", "ShowLogConfigWindow", &m_InterfaceLogConfigWindow, false);
ini.Get("Interface", "ShowConsole", &m_InterfaceConsole, false);
ini.Get("Interface", "ThemeName", &m_LocalCoreStartupParameter.theme_name, "Boomy");
// Hotkeys
for (int i = 0; i < NUM_HOTKEYS; i++)

View File

@ -123,6 +123,7 @@ struct SCoreStartupParameter
// Interface settings
bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers, bOnScreenDisplayMessages;
std::string theme_name;
// Hotkeys
int iHotkey[NUM_HOTKEYS];

View File

@ -495,7 +495,7 @@ void CFrame::RecreateToolbar()
void CFrame::InitBitmaps()
{
wxString dir("theme/");
wxString dir(File::GetUserPath(D_THEMES_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name + "/");
m_Bitmaps[Toolbar_FileOpen].LoadFile(dir + "open.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_Refresh].LoadFile(dir + "refresh.png", wxBITMAP_TYPE_PNG);