mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement CDXUTDialog::GetNextControl(...)
This commit is contained in:
parent
937495a9b8
commit
92f47f526f
@ -372,6 +372,25 @@ CDXUTControl* CDXUTDialog::GetControl( int ID, UINT nControlType )
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
CDXUTControl* CDXUTDialog::GetNextControl( CDXUTControl* pControl )
|
||||
{
|
||||
int index = pControl->m_Index + 1;
|
||||
|
||||
CDXUTDialog* pDialog = pControl->m_pDialog;
|
||||
|
||||
// Cycle through dialogs in the loop to find the next control. Note
|
||||
// that if only one control exists in all looped dialogs it will
|
||||
// be the returned 'next' control.
|
||||
while( index >= (int) pDialog->m_Controls.GetSize() )
|
||||
{
|
||||
pDialog = pDialog->m_pNextDialog;
|
||||
index = 0;
|
||||
}
|
||||
|
||||
return pDialog->m_Controls.GetAt( index );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// CDXUTControl class
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
@ -101,6 +101,8 @@ public:
|
||||
// Methods called by controls
|
||||
void SendEvent( UINT nEvent, bool bTriggeredByUser, CDXUTControl* pControl );
|
||||
|
||||
|
||||
static CDXUTControl* GetNextControl( CDXUTControl* pControl );
|
||||
void RemoveAllControls();
|
||||
|
||||
// Sets the callback used to notify the app of control events
|
||||
|
Loading…
Reference in New Issue
Block a user