[Project64] Move SetWindowCaption from Notification Class to Gui Class
This commit is contained in:
parent
e25fedcae2
commit
e4bd5eae74
|
@ -138,6 +138,16 @@ void CMainGui::AddRecentRom(const char * ImagePath)
|
|||
}
|
||||
}
|
||||
|
||||
void CMainGui::SetWindowCaption(const wchar_t * title)
|
||||
{
|
||||
static const size_t TITLE_SIZE = 256;
|
||||
wchar_t WinTitle[TITLE_SIZE];
|
||||
|
||||
_snwprintf(WinTitle, TITLE_SIZE, L"%s - %s", title, g_Settings->LoadStringVal(Setting_ApplicationName).ToUTF16().c_str());
|
||||
WinTitle[TITLE_SIZE - 1] = 0;
|
||||
Caption(WinTitle);
|
||||
}
|
||||
|
||||
void RomBowserEnabledChanged(CMainGui * Gui)
|
||||
{
|
||||
if (Gui && g_Settings->LoadBool(RomBrowser_Enabled))
|
||||
|
@ -168,7 +178,7 @@ void CMainGui::GameLoaded(CMainGui * Gui)
|
|||
{
|
||||
WriteTrace(TraceDebug, __FUNCTION__ ": Add Recent Rom");
|
||||
Gui->AddRecentRom(FileLoc.c_str());
|
||||
Notify().SetWindowCaption(g_Settings->LoadStringVal(Game_GoodName).ToUTF16().c_str());
|
||||
Gui->SetWindowCaption(g_Settings->LoadStringVal(Game_GoodName).ToUTF16().c_str());
|
||||
|
||||
Gui->HideRomList();
|
||||
}
|
||||
|
|
|
@ -104,6 +104,7 @@ private:
|
|||
void CreateStatusBar(void);
|
||||
void Resize(DWORD fwSizeType, WORD nWidth, WORD nHeight); //responding to WM_SIZE
|
||||
void AddRecentRom(const char * ImagePath);
|
||||
void SetWindowCaption(const wchar_t * Caption);
|
||||
|
||||
friend DWORD CALLBACK AboutBoxProc(HWND, DWORD, DWORD, DWORD);
|
||||
friend DWORD CALLBACK AboutIniBoxProc(HWND, DWORD, DWORD, DWORD);
|
||||
|
|
|
@ -125,20 +125,6 @@ void CNotification::SetGfxPlugin(CGfxPlugin * Plugin)
|
|||
m_gfxPlugin = Plugin;
|
||||
}
|
||||
|
||||
void CNotification::SetWindowCaption(const wchar_t * Caption)
|
||||
{
|
||||
static const size_t TITLE_SIZE = 256;
|
||||
wchar_t WinTitle[TITLE_SIZE];
|
||||
|
||||
_snwprintf(WinTitle, TITLE_SIZE, L"%s - %s", Caption, g_Settings->LoadStringVal(Setting_ApplicationName).ToUTF16().c_str());
|
||||
WinTitle[TITLE_SIZE - 1] = 0;
|
||||
#if defined(WINDOWS_UI)
|
||||
m_hWnd->Caption(WinTitle);
|
||||
#else
|
||||
g_Notify->BreakPoint(__FILEW__, __LINE__);
|
||||
#endif
|
||||
}
|
||||
|
||||
void CNotification::FatalError(LanguageStringID StringID) const
|
||||
{
|
||||
FatalError(g_Lang->GetString(StringID).c_str());
|
||||
|
|
Loading…
Reference in New Issue