This commit is contained in:
Daveo 2000-12-01 21:33:02 +00:00
parent 2f0ec2e48f
commit 33ad51327f
2 changed files with 33 additions and 20 deletions

View file

@ -237,9 +237,9 @@ Vec &ThisCam=GetCam();
void CCore::SetMode(int NewMode) void CCore::SetMode(int NewMode)
{ {
BOOL RedrawFlag=FALSE; BOOL RedrawFlag=FALSE;
RedrawFlag=Layer[ActiveLayer]->SetMode(NewMode); RedrawFlag=Layer[ActiveLayer]->SetMode(NewMode);
//if (RedrawFlag) View->Invalidate();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -256,7 +256,10 @@ BOOL RedrawFlag=FALSE;
} }
else else
{ {
RedrawFlag=Layer[ActiveLayer]->LButtonControl(this,View,nFlags,CursorPos,DownFlag); if (Layer[ActiveLayer]->IsVisible())
{
RedrawFlag=Layer[ActiveLayer]->LButtonControl(this,View,nFlags,CursorPos,DownFlag);
}
} }
TileBank.SetActiveBrushL(); TileBank.SetActiveBrushL();
@ -283,7 +286,10 @@ BOOL RedrawFlag=FALSE;
} }
else else
{ {
RedrawFlag=Layer[ActiveLayer]->RButtonControl(this,View,nFlags,CursorPos,DownFlag); if (Layer[ActiveLayer]->IsVisible())
{
RedrawFlag=Layer[ActiveLayer]->RButtonControl(this,View,nFlags,CursorPos,DownFlag);
}
} }
TileBank.SetActiveBrushR(); TileBank.SetActiveBrushR();
@ -341,15 +347,18 @@ Vec &ThisCam=GetCam();
} }
} }
else else
{ // Mouse still moved, so need to redraw windows, to get CursorPos (And pos render) {
View->Invalidate();
if (TileViewFlag) if (TileViewFlag)
{ {
} }
else else
{ {
Layer[ActiveLayer]->MouseMove(this,View,nFlags,CursorPos); if (Layer[ActiveLayer]->IsVisible())
{
Layer[ActiveLayer]->MouseMove(this,View,nFlags,CursorPos);
}
} }
View->Invalidate(); // Mouse still moved, so need to redraw windows, to get CursorPos (And pos render)
} }
} }
@ -401,11 +410,15 @@ CMainFrame *Frm=(CMainFrame*)AfxGetApp()->GetMainWnd();
CMultiBar *ParamBar=Frm->GetParamBar(); CMultiBar *ParamBar=Frm->GetParamBar();
CLayerList *List=(CLayerList*)Frm->GetDialog(IDD_LAYER_LIST_DIALOG); CLayerList *List=(CLayerList*)Frm->GetDialog(IDD_LAYER_LIST_DIALOG);
Layer[ActiveLayer]->SetVisible(List->ListBox.GetCheck(ActiveLayer)); // If toggling layer, dont change the layer
if (ActiveLayer!=NewLayer) if (List->ListBox.GetCheck(NewLayer)!=Layer[NewLayer]->IsVisible())
{
Layer[NewLayer]->SetVisible(List->ListBox.GetCheck(NewLayer));
List->ListBox.SetCurSel(ActiveLayer);
}
else
{ {
ActiveLayer=NewLayer; ActiveLayer=NewLayer;
Layer[ActiveLayer]->SetVisible(List->ListBox.GetCheck(ActiveLayer));
} }
} }

View file

@ -2,7 +2,7 @@
[General Info] [General Info]
Version=1 Version=1
LastClass=CProgressDlg LastClass=CLayerList
LastTemplate=CDialog LastTemplate=CDialog
NewFileInclude1=#include "stdafx.h" NewFileInclude1=#include "stdafx.h"
NewFileInclude2=#include "mapedit.h" NewFileInclude2=#include "mapedit.h"
@ -18,21 +18,21 @@ Class6=CMapEditDoc
Class7=CMapEditView Class7=CMapEditView
ResourceCount=11 ResourceCount=11
Resource1=IDR_MAINFRAME (English (U.S.)) Resource1=IDD_MAPSIZE
Resource2=IDR_TOOLBAR (English (U.S.)) Resource2=IDD_LAYERTILE_GUI
Resource3=IDD_MULTIBAR (English (U.S.)) Resource3=IDR_TOOLBAR (English (U.S.))
Resource4=IDD_DIALOGBAR (English (U.S.)) Resource4=IDD_DIALOGBAR (English (U.S.))
Resource5=IDD_LAYERTILE_GUI Resource5=IDD_ABOUTBOX (English (U.S.))
Class8=CMultiBar Class8=CMultiBar
Resource6=IDD_NEW_LAYER Resource6=IDD_LAYER_LIST_DIALOG
Resource7=IDR_MAPEDITYPE (English (U.S.)) Resource7=IDR_MAPEDITYPE (English (U.S.))
Class9=CLayerList Class9=CLayerList
Class10=CMapSizeDlg Class10=CMapSizeDlg
Resource8=IDD_LAYER_LIST_DIALOG Resource8=IDR_MAINFRAME (English (U.S.))
Class11=CGfxToolBar Class11=CGfxToolBar
Class12=CLayerTileGUI Class12=CLayerTileGUI
Resource9=IDD_ABOUTBOX (English (U.S.)) Resource9=IDD_NEW_LAYER
Resource10=IDD_MAPSIZE Resource10=IDD_MULTIBAR (English (U.S.))
Class13=CNewMapGUI Class13=CNewMapGUI
Class14=CProgressDlg Class14=CProgressDlg
Resource11=IDD_NEWMAP Resource11=IDD_NEWMAP
@ -218,7 +218,7 @@ ImplementationFile=LayerList.cpp
BaseClass=CDialog BaseClass=CDialog
Filter=D Filter=D
VirtualFilter=dWC VirtualFilter=dWC
LastObject=CLayerList LastObject=IDC_LAYER_LIST
[CLS:CGfxToolBar] [CLS:CGfxToolBar]
Type=0 Type=0