mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 01:38:17 +08:00
[saco] Implement CDXUTDialog::SendEvent(...)
This commit is contained in:
1 parent
8fc6a8e473
commit
fd4965bf98
2 files changed
+20
No files matched your search
@@ -203,6 +203,22 @@ void CDXUTDialog::Refresh()
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
VOID CDXUTDialog::SendEvent( UINT nEvent, bool bTriggeredByUser, CDXUTControl* pControl )
|
||||
{
|
||||
// If no callback has been registered there's nowhere to send the event to
|
||||
if( m_pCallbackEvent == NULL )
|
||||
return;
|
||||
|
||||
// Discard events triggered programatically if these types of events haven't been
|
||||
// enabled
|
||||
if( !bTriggeredByUser && !m_bNonUserEvents )
|
||||
return;
|
||||
|
||||
m_pCallbackEvent( nEvent, pControl->GetID(), pControl, m_pCallbackEventUserContext );
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// CDXUTControl class
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
@@ -91,6 +91,10 @@ public:
|
||||
CDXUTDialog();
|
||||
~CDXUTDialog();
|
||||
|
||||
|
||||
// Methods called by controls
|
||||
void SendEvent( UINT nEvent, bool bTriggeredByUser, CDXUTControl* pControl );
|
||||
|
||||
void RemoveAllControls();
|
||||
|
||||
// Sets the callback used to notify the app of control events
|
||||
|
||||
Reference in new issue
Block a user