mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 11:43:04 +08:00
[saco] Implement CDXUTDialog::GetNextControl(...)
This commit is contained in:
@@ -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
|
// CDXUTControl class
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -101,6 +101,8 @@ public:
|
|||||||
// Methods called by controls
|
// Methods called by controls
|
||||||
void SendEvent( UINT nEvent, bool bTriggeredByUser, CDXUTControl* pControl );
|
void SendEvent( UINT nEvent, bool bTriggeredByUser, CDXUTControl* pControl );
|
||||||
|
|
||||||
|
|
||||||
|
static CDXUTControl* GetNextControl( CDXUTControl* pControl );
|
||||||
void RemoveAllControls();
|
void RemoveAllControls();
|
||||||
|
|
||||||
// Sets the callback used to notify the app of control events
|
// Sets the callback used to notify the app of control events
|
||||||
|
|||||||
Reference in New Issue
Block a user