mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 01:28:57 +00:00
Core: Move the titlebar / statusbar abstraction to DolphinWX
The concept of a "title bar" / "status bar" shouldn't be a core concept, so remove the Host_UpdateStatusBar function, and move the code handles whether to update the status bar or titlebar into DolphinWX.
This commit is contained in:
parent
3bad4bcfdb
commit
6dbafa9238
7 changed files with 18 additions and 29 deletions
|
@ -628,6 +628,21 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
|||
}
|
||||
#endif
|
||||
|
||||
void CFrame::UpdateTitle(const std::string &str)
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
|
||||
SConfig::GetInstance().m_InterfaceStatusbar)
|
||||
{
|
||||
GetStatusBar()->SetStatusText(str, 0);
|
||||
m_RenderFrame->SetTitle(scm_rev_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string titleStr = StringFromFormat("%s | %s", scm_rev_str, str.c_str());
|
||||
m_RenderFrame->SetTitle(titleStr);
|
||||
}
|
||||
}
|
||||
|
||||
void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||
{
|
||||
switch (event.GetId())
|
||||
|
@ -642,8 +657,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
|||
break;
|
||||
|
||||
case IDM_UPDATETITLE:
|
||||
if (m_RenderFrame != nullptr)
|
||||
m_RenderFrame->SetTitle(event.GetString());
|
||||
SetTitle(event.GetString());
|
||||
break;
|
||||
|
||||
case IDM_WINDOWSIZEREQUEST:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue