[saco] Implement CDXUTDialog::Refresh()

This commit is contained in:
RD42 2024-05-24 22:46:03 +08:00
parent b3ff5fd8aa
commit 8fc6a8e473
2 changed files with 24 additions and 0 deletions

View File

@ -179,7 +179,28 @@ void CDXUTDialogResourceManager::OnDestroyDevice()
}
//--------------------------------------------------------------------------------------
void CDXUTDialog::Refresh()
{
if( s_pControlFocus )
s_pControlFocus->OnFocusOut();
if( m_pControlMouseOver )
m_pControlMouseOver->OnMouseLeave();
s_pControlFocus = NULL;
s_pControlPressed = NULL;
m_pControlMouseOver = NULL;
for( int i=0; i < m_Controls.GetSize(); i++ )
{
CDXUTControl* pControl = m_Controls.GetAt(i);
pControl->Refresh();
}
if( m_bKeyboardInput )
FocusDefaultControl();
}
//--------------------------------------------------------------------------------------

View File

@ -96,6 +96,9 @@ public:
// Sets the callback used to notify the app of control events
void SetCallback( PCALLBACKDXUTGUIEVENT pCallback, void* pUserContext = NULL );
// Device state notification
void Refresh();
bool m_bNonUserEvents;
bool m_bKeyboardInput;