1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 // vegetable_select_dlg.cpp : implementation file
24 #include "object_viewer.h"
25 #include "vegetable_select_dlg.h"
26 #include "vegetable_dlg.h"
29 /////////////////////////////////////////////////////////////////////////////
30 // CVegetableSelectDlg dialog
33 CVegetableSelectDlg::CVegetableSelectDlg(CVegetableDlg
*vegetableDlg
, CWnd
* pParent
/*=NULL*/)
34 : CDialog(CVegetableSelectDlg::IDD
, pParent
), _VegetableDlg(vegetableDlg
)
36 //{{AFX_DATA_INIT(CVegetableSelectDlg)
37 VegetableSelected
= -1;
42 void CVegetableSelectDlg::DoDataExchange(CDataExchange
* pDX
)
44 CDialog::DoDataExchange(pDX
);
45 //{{AFX_DATA_MAP(CVegetableSelectDlg)
46 DDX_Control(pDX
, IDC_LIST1
, VegetableList
);
47 DDX_LBIndex(pDX
, IDC_LIST1
, VegetableSelected
);
52 BEGIN_MESSAGE_MAP(CVegetableSelectDlg
, CDialog
)
53 //{{AFX_MSG_MAP(CVegetableSelectDlg)
54 ON_LBN_DBLCLK(IDC_LIST1
, OnDblclkList1
)
58 /////////////////////////////////////////////////////////////////////////////
59 // CVegetableSelectDlg message handlers
61 BOOL
CVegetableSelectDlg::OnInitDialog()
63 CDialog::OnInitDialog();
65 // Init the control list.
66 uint num
= _VegetableDlg
->getNumVegetables();
67 for(uint i
=0; i
<num
; i
++)
69 VegetableList
.AddString(nlUtf8ToTStr(_VegetableDlg
->getVegetableName(i
)));
72 return TRUE
; // return TRUE unless you set the focus to a control
73 // EXCEPTION: OCX Property Pages should return FALSE
76 void CVegetableSelectDlg::OnDblclkList1()
79 // DblClck select the name.