EgtExecutor :
- piccole migliorie a funzione lua EgtDialogBox.
This commit is contained in:
+14
-5
@@ -640,10 +640,19 @@ CALLBACK DialogBoxProc( HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam
|
||||
string sList = s_sEdit[i].substr( 3) ;
|
||||
STRVECTOR vsVal ;
|
||||
Tokenize( sList, ",", vsVal) ;
|
||||
int nSel = 0 ;
|
||||
HWND hwndCBox = GetDlgItem( hwndDlg, IDC_COMBO1 + i) ;
|
||||
for ( int j = 0 ; j < int( vsVal.size()) ; ++ j)
|
||||
ComboBox_AddString( hwndCBox, stringtoW( vsVal[j])) ;
|
||||
ComboBox_SetCurSel( hwndCBox, 0) ;
|
||||
for ( int j = 0 ; j < int( vsVal.size()) ; ++ j) {
|
||||
string sItem ;
|
||||
if ( vsVal[j][0] == '*') {
|
||||
nSel = j ;
|
||||
sItem = vsVal[j].substr( 1) ;
|
||||
}
|
||||
else
|
||||
sItem = vsVal[j] ;
|
||||
ComboBox_AddString( hwndCBox, stringtoW( sItem)) ;
|
||||
}
|
||||
ComboBox_SetCurSel( hwndCBox, nSel) ;
|
||||
ShowWindow( GetDlgItem( hwndDlg, IDC_EDIT1 + i), SW_HIDE) ;
|
||||
s_bCBox[i] = true ;
|
||||
}
|
||||
@@ -689,8 +698,8 @@ LuaDialogBox( lua_State* L)
|
||||
for ( int i = 0 ; i < MAX_CTRLS ; ++ i) {
|
||||
STRVECTOR vData ;
|
||||
if ( LuaGetParam( L, 2 + i, vData)) {
|
||||
s_sText[i] = vData[0] ;
|
||||
s_sEdit[i] = vData[1] ;
|
||||
s_sText[i] = Trim( vData[0]) ;
|
||||
s_sEdit[i] = Trim( vData[1]) ;
|
||||
++ s_nCtrls ;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user