This commit is contained in:
Daveo 2000-11-02 15:46:17 +00:00
parent 2518a438e2
commit 23d9f79f4c
11 changed files with 283 additions and 164 deletions

View file

@ -123,47 +123,7 @@ CMapEditDoc *CurDoc=GetDocument();
/*********************************************************************************/
void CMapEditView::UpdateAll()
{
UpdateLayerBar();
}
/*********************************************************************************/
void CMapEditView::UpdateLayerBar()
{
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
CDialogBar *LayerBar=Frm->GetLayerBar();
CListBox *Dlg=(CListBox *)LayerBar->GetDlgItem(IDC_LAYERBAR_LIST);
int CurSel=Dlg->GetCurSel();
Dlg->ResetContent();
for (int i=0;i<LAYER_TYPE_MAX;i++)
{
CLayer *ThisLayer=Core.LayerGet(i);
Dlg->AddString(ThisLayer->GetName());
}
Dlg->SetCurSel(CurSel);
}
/*********************************************************************************/
int CMapEditView::GetLayerCurSel()
{
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
CDialogBar *LayerBar=Frm->GetLayerBar();
CListBox *Dlg=(CListBox *)LayerBar->GetDlgItem(IDC_LAYERBAR_LIST);
return(Dlg->GetCurSel());
}
/*********************************************************************************/
int CMapEditView::GetLayerCount()
{
CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
CDialogBar *LayerBar=Frm->GetLayerBar();
CListBox *Dlg=(CListBox *)LayerBar->GetDlgItem(IDC_LAYERBAR_LIST);
return(Dlg->GetCount());
Core.UpdateAll();
}
/*********************************************************************************/
@ -178,14 +138,5 @@ void CMapEditView::OnRButtonDown(UINT nFlags, CPoint point) {Core.RButtonCont
void CMapEditView::OnRButtonUp(UINT nFlags, CPoint point) {Core.RButtonControl(nFlags,point,FALSE);}
void CMapEditView::OnMouseMove(UINT nFlags, CPoint point) {Core.MouseMove(nFlags, point);}
void CMapEditView::OnToolbarLayerbar()
{
Core.ToggleLayerPalette();
}
void CMapEditView::OnToolbarTilepalette()
{
Core.ToggleTileView();
}
void CMapEditView::OnToolbarLayerbar() {Core.ToggleLayerView();}
void CMapEditView::OnToolbarTilepalette() {Core.ToggleTileView();}