|
|
@ -98,7 +98,7 @@ void SelectionTerritoire::OnAddTerritoire()
|
|
|
|
CListBox *list=(CListBox*)GetDlgItem(IDC_LIST_TERRITOIRE);
|
|
|
|
CListBox *list=(CListBox*)GetDlgItem(IDC_LIST_TERRITOIRE);
|
|
|
|
if (list->FindStringExact(0,GetStr.name)!=LB_ERR)
|
|
|
|
if (list->FindStringExact(0,GetStr.name)!=LB_ERR)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox("Ce nom existe deja","Error",MB_ICONERROR);
|
|
|
|
MessageBox(_T("Ce nom existe deja","Error"), MB_ICONERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -163,7 +163,7 @@ void SelectionTerritoire::OnEditTerritoire()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox("No tilesset selected","Error",MB_ICONERROR);
|
|
|
|
MessageBox(_T("No tilesset selected"), _T("Error"), MB_ICONERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -179,7 +179,7 @@ void SelectionTerritoire::OnRemoveTerritoire()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox("No tilesset selected","Chcrois kca va pas etreuu possibleuuu",MB_ICONERROR);
|
|
|
|
MessageBox(_T("No tilesset selected"), _T("Chcrois kca va pas etreuu possibleuuu"), MB_ICONERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -197,7 +197,7 @@ void SelectionTerritoire::OnAddTileSet()
|
|
|
|
CListBox *list=(CListBox*)GetDlgItem(IDC_TILE_SET);
|
|
|
|
CListBox *list=(CListBox*)GetDlgItem(IDC_TILE_SET);
|
|
|
|
if (list->FindStringExact(0,GetStr.name)!=LB_ERR)
|
|
|
|
if (list->FindStringExact(0,GetStr.name)!=LB_ERR)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox("Ce nom existe deja","Error",MB_ICONERROR);
|
|
|
|
MessageBox(_T("Ce nom existe deja") , _T("Error"), MB_ICONERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -268,7 +268,7 @@ void SelectionTerritoire::OnEditTileSet()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox("No tilesset selected","Error",MB_ICONERROR);
|
|
|
|
MessageBox(_T("No tilesset selected"), _T("Error"), MB_ICONERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -284,7 +284,7 @@ void SelectionTerritoire::OnRemoveTileSet()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox("No tilesset selected","Chcrois kca va pas etreuu possibleuuu",MB_ICONERROR);
|
|
|
|
MessageBox(_T("No tilesset selected"), _T("Chcrois kca va pas etreuu possibleuuu"), MB_ICONERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -315,7 +315,7 @@ void SelectionTerritoire::OnMonter()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox("No tilesset selected","Chcrois kca va pas etreuu possibleuuu",MB_ICONERROR);
|
|
|
|
MessageBox(_T("No tilesset selected"), _T("Chcrois kca va pas etreuu possibleuuu"), MB_ICONERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -346,7 +346,7 @@ void SelectionTerritoire::OnDescendre()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox("No tilesset selected","Chcrois kca va pas etreuu possibleuuu",MB_ICONERROR);
|
|
|
|
MessageBox(_T("No tilesset selected"), _T("Chcrois kca va pas etreuu possibleuuu"), MB_ICONERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -355,9 +355,8 @@ void SelectionTerritoire::OnSelect()
|
|
|
|
// TODO: Add your control notification handler code here
|
|
|
|
// TODO: Add your control notification handler code here
|
|
|
|
CListBox *list=(CListBox*)GetDlgItem(IDC_LIST_TERRITOIRE);
|
|
|
|
CListBox *list=(CListBox*)GetDlgItem(IDC_LIST_TERRITOIRE);
|
|
|
|
CListBox *list2=(CListBox*)GetDlgItem(IDC_TILE_SET);
|
|
|
|
CListBox *list2=(CListBox*)GetDlgItem(IDC_TILE_SET);
|
|
|
|
static char BASED_CODE szFilter[] =
|
|
|
|
static TCHAR BASED_CODE szFilter[] = _T("NeL tile bank files (*.bank)|*.bank|All Files (*.*)|*.*||");
|
|
|
|
"NeL tile bank files (*.bank)|*.bank|All Files (*.*)|*.*||";
|
|
|
|
CFileDialog sFile(true, _T("bank"), _T("main.bank"), 0, szFilter, this);
|
|
|
|
CFileDialog sFile(true, "bank", "main.bank",0, szFilter, this);
|
|
|
|
|
|
|
|
if (sFile.DoModal()==IDOK)
|
|
|
|
if (sFile.DoModal()==IDOK)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
POSITION p = sFile.GetStartPosition();
|
|
|
|
POSITION p = sFile.GetStartPosition();
|
|
|
@ -425,7 +424,7 @@ LRESULT SelectionTerritoire::WindowProc(UINT message, WPARAM wParam, LPARAM lPar
|
|
|
|
void SelectionTerritoire::OnOK()
|
|
|
|
void SelectionTerritoire::OnOK()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// TODO: Add extra validation here
|
|
|
|
// TODO: Add extra validation here
|
|
|
|
if (::MessageBox (NULL, "Are you sure you want to quit?", "Quit", MB_OK|MB_ICONQUESTION|MB_YESNO)==IDYES)
|
|
|
|
if (::MessageBox (NULL, _T("Are you sure you want to quit?"), _T("Quit"), MB_OK|MB_ICONQUESTION|MB_YESNO)==IDYES)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CDialog::OnOK();
|
|
|
|
CDialog::OnOK();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -453,9 +452,8 @@ void SelectionTerritoire::Save(const char* path, CTileBank &toSave)
|
|
|
|
void SelectionTerritoire::OnSaveAs()
|
|
|
|
void SelectionTerritoire::OnSaveAs()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// TODO: Add your control notification handler code here
|
|
|
|
// TODO: Add your control notification handler code here
|
|
|
|
static char BASED_CODE szFilter[] =
|
|
|
|
static TCHAR BASED_CODE szFilter[] = _T("NeL tile bank files (*.bank)|*.bank|All Files (*.*)|*.*||");
|
|
|
|
"NeL tile bank files (*.bank)|*.bank|All Files (*.*)|*.*||";
|
|
|
|
CFileDialog sFile(false, _T("bank"), DefautPath+MainFileName, 0, szFilter, this);
|
|
|
|
CFileDialog sFile(false, "bank", DefautPath+MainFileName, 0, szFilter, this);
|
|
|
|
|
|
|
|
if (sFile.DoModal()==IDOK)
|
|
|
|
if (sFile.DoModal()==IDOK)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Save (sFile.GetPathName(), tileBank);
|
|
|
|
Save (sFile.GetPathName(), tileBank);
|
|
|
@ -482,7 +480,7 @@ void SelectionTerritoire::OnSaveAs()
|
|
|
|
void SelectionTerritoire::OnCancel()
|
|
|
|
void SelectionTerritoire::OnCancel()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// TODO: Add extra cleanup here
|
|
|
|
// TODO: Add extra cleanup here
|
|
|
|
if (::MessageBox (NULL, "Are you sure you want to quit?", "Quit", MB_OK|MB_ICONQUESTION|MB_YESNO)==IDYES)
|
|
|
|
if (::MessageBox (NULL, _T("Are you sure you want to quit?"), _T("Quit"), MB_OK|MB_ICONQUESTION|MB_YESNO)==IDYES)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CDialog::OnCancel();
|
|
|
|
CDialog::OnCancel();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -543,7 +541,7 @@ void SelectionTerritoire::OnPath()
|
|
|
|
// Last check
|
|
|
|
// Last check
|
|
|
|
char msg[512];
|
|
|
|
char msg[512];
|
|
|
|
sprintf (msg, "Do you really want to set %s as base path of the bank ?", path);
|
|
|
|
sprintf (msg, "Do you really want to set %s as base path of the bank ?", path);
|
|
|
|
if (MessageBox (msg, "TileEdit", MB_YESNO|MB_ICONQUESTION)==IDYES)
|
|
|
|
if (MessageBox (msg, _T("TileEdit"), MB_YESNO|MB_ICONQUESTION)==IDYES)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Set as default path..
|
|
|
|
// Set as default path..
|
|
|
|
|
|
|
|
|
|
|
@ -591,7 +589,7 @@ void SelectionTerritoire::OnPath()
|
|
|
|
sprintf (msg, "Path '%s' can't be found in bitmap '%s'. Continue ?", path, bitmapPath.c_str());
|
|
|
|
sprintf (msg, "Path '%s' can't be found in bitmap '%s'. Continue ?", path, bitmapPath.c_str());
|
|
|
|
|
|
|
|
|
|
|
|
// Message
|
|
|
|
// Message
|
|
|
|
if (MessageBox (msg, "TileEdit", MB_YESNO|MB_ICONQUESTION)==IDNO)
|
|
|
|
if (MessageBox (msg, _T("TileEdit"), MB_YESNO|MB_ICONQUESTION)==IDNO)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -620,7 +618,7 @@ void SelectionTerritoire::OnPath()
|
|
|
|
sprintf (msg, "Path '%s' can't be found in bitmap '%s'. Continue ?", path, bitmapPath);
|
|
|
|
sprintf (msg, "Path '%s' can't be found in bitmap '%s'. Continue ?", path, bitmapPath);
|
|
|
|
|
|
|
|
|
|
|
|
// Message
|
|
|
|
// Message
|
|
|
|
if (MessageBox (msg, "TileEdit", MB_YESNO|MB_ICONQUESTION)==IDNO)
|
|
|
|
if (MessageBox (msg, _T("TileEdit"), MB_YESNO|MB_ICONQUESTION)==IDNO)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -683,7 +681,7 @@ void SelectionTerritoire::OnPath()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
// Info message
|
|
|
|
// Info message
|
|
|
|
MessageBox ("Can't set the path.", "TileEdit", MB_OK|MB_ICONINFORMATION);
|
|
|
|
MessageBox (_T("Can't set the path."), _T("TileEdit"), MB_OK|MB_ICONINFORMATION);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -706,9 +704,9 @@ void SelectionTerritoire::OnPath()
|
|
|
|
void SelectionTerritoire::OnExport()
|
|
|
|
void SelectionTerritoire::OnExport()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// TODO: Add your control notification handler code here
|
|
|
|
// TODO: Add your control notification handler code here
|
|
|
|
static char BASED_CODE szFilter[] =
|
|
|
|
static TCHAR BASED_CODE szFilter[] =
|
|
|
|
"NeL tile bank files (*.smallbank)|*.smallbank|All Files (*.*)|*.*||";
|
|
|
|
_T("NeL tile bank files (*.smallbank)|*.smallbank|All Files (*.*)|*.*||");
|
|
|
|
CFileDialog sFile(false, "*.smallbank", DefautPath+"*.smallbank", 0, szFilter, this);
|
|
|
|
CFileDialog sFile(false, _T("*.smallbank"), DefautPath+ _T("*.smallbank"), 0, szFilter, this);
|
|
|
|
if (sFile.DoModal()==IDOK)
|
|
|
|
if (sFile.DoModal()==IDOK)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Copy the bank
|
|
|
|
// Copy the bank
|
|
|
@ -737,7 +735,7 @@ void SelectionTerritoire::OnChooseVeget()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox("No tilesset selected","Error",MB_ICONERROR);
|
|
|
|
MessageBox(_T("No tilesset selected"), _T("Error"), MB_ICONERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|