----------------- CONSTRUCTORS ------------------ dialog::dialog(u16 ctrlType, short index, const char *text, u16 left, u16 top, u16 width, u16 height, bool (__fastcall *pfInteract)(dialog*,dlgEvent*)) : pNext( nullptr ) , srcBits(width, height) , pszText( const_cast (text) ) , lFlags( CTRL_VISIBLE ) , wIndex( index ) , wCtrlType( ctrlType ) { if ( ctrlT
| 242 | }*/ |
| 243 | // --------------------- FIND ---------------------- |
| 244 | dialog *dialog::findIndex(short wIndex) |
| 245 | { |
| 246 | if ( !this ) |
| 247 | return nullptr; |
| 248 | |
| 249 | dialog *pCurrDlg; |
| 250 | if ( this->isDialog() ) |
| 251 | pCurrDlg = this; |
| 252 | else |
| 253 | pCurrDlg = this->parent(); |
| 254 | |
| 255 | if ( pCurrDlg ) |
| 256 | pCurrDlg = pCurrDlg->child(); |
| 257 | |
| 258 | while ( pCurrDlg && pCurrDlg->getIndex() != wIndex ) |
| 259 | pCurrDlg = pCurrDlg->next(); |
| 260 | |
| 261 | if ( pCurrDlg && pCurrDlg->getIndex() == wIndex ) |
| 262 | return pCurrDlg; |
| 263 | |
| 264 | return nullptr; |
| 265 | } |
| 266 | // ------------------ FIND BY NAME ----------------- |
| 267 | dialog *dialog::findDialog(const char *pszName) |
| 268 | { |