This commit is contained in:
parent
425713a3aa
commit
c1309c1c96
44 changed files with 2193 additions and 1452 deletions
|
@ -17,53 +17,39 @@
|
|||
#include "Elem.h"
|
||||
|
||||
#include "MapEdit.h"
|
||||
#include "LayerTileGui.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
enum ElemStoreEnum
|
||||
{
|
||||
DefBrowserWidth=8,
|
||||
};
|
||||
#include "GUIElemList.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
class CCore;
|
||||
|
||||
/*****************************************************************************/
|
||||
class CElemStore : public CLayer, public CElemBank
|
||||
{
|
||||
public:
|
||||
CElemStore();
|
||||
~CElemStore();
|
||||
|
||||
enum BrushEnum
|
||||
{
|
||||
LBrush=0,
|
||||
RBrush,
|
||||
MaxBrush
|
||||
};
|
||||
// Overloads
|
||||
int GetType() {return(0);}
|
||||
virtual int GetType() {return(0);}
|
||||
|
||||
void Render(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
void RenderGrid(CCore *Core,Vector3 &CamPos,bool Active);
|
||||
void RenderSelection(CCore *Core,Vector3 &ThisCam){};
|
||||
void RenderCursor(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
void FindCursorPos(CCore *Core,Vector3 &CamPos,CPoint &MousePos);
|
||||
virtual void Render(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
virtual void RenderGrid(CCore *Core,Vector3 &CamPos,bool Active){}
|
||||
virtual void RenderSelection(CCore *Core,Vector3 &ThisCam){};
|
||||
virtual void RenderCursor(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
virtual void FindCursorPos(CCore *Core,Vector3 &CamPos,CPoint &MousePos){}
|
||||
|
||||
void GUIInit(CCore *Core);
|
||||
void GUIKill(CCore *Core);
|
||||
void GUIUpdate(CCore *Core);
|
||||
void GUIChanged(CCore *Core);
|
||||
virtual void GUIInit(CCore *Core);
|
||||
virtual void GUIKill(CCore *Core);
|
||||
virtual void GUIUpdate(CCore *Core);
|
||||
virtual void GUIChanged(CCore *Core);
|
||||
|
||||
void Load(CFile *File,int Version);
|
||||
void Save(CFile *File);
|
||||
virtual void Load(CFile *File,int Version);
|
||||
virtual void Save(CFile *File);
|
||||
|
||||
void Export(CCore *Core,CExport &Exp){};
|
||||
virtual void Export(CCore *Core,CExport &Exp){};
|
||||
|
||||
bool LButtonControl(CCore *Core,UINT nFlags, CPoint &CursorPos,bool DownFlag);
|
||||
bool RButtonControl(CCore *Core,UINT nFlags, CPoint &CursorPos,bool DownFlag);
|
||||
bool MouseMove(CCore *Core,UINT nFlags, CPoint &CursorPos);
|
||||
bool Command(int CmdMsg,CCore *Core,int Param0=0,int Param1=0);
|
||||
virtual bool LButtonControl(CCore *Core,UINT nFlags, CPoint &CursorPos,bool DownFlag);
|
||||
virtual bool RButtonControl(CCore *Core,UINT nFlags, CPoint &CursorPos,bool DownFlag);
|
||||
virtual bool MouseMove(CCore *Core,UINT nFlags, CPoint &CursorPos);
|
||||
virtual bool Command(int CmdMsg,CCore *Core,int Param0=0,int Param1=0);
|
||||
|
||||
// ElemSet Thruput
|
||||
const char *GetSetName(int Set) {return(SetList[Set].GetName());}
|
||||
|
@ -72,36 +58,13 @@ const char *GetSetFilename(int Set) {return(SetList[Set].GetFilename());
|
|||
void RenderElem(int Set,int Elem,int Flags,bool Is3d);
|
||||
|
||||
// Local
|
||||
void DeleteCurrent();
|
||||
|
||||
CMap &GetLBrush() {return(Brush[LBrush]);}
|
||||
CMap &GetRBrush() {return(Brush[RBrush]);}
|
||||
CMap &GetBrush(int i) {return(Brush[i]);}
|
||||
CMap &GetActiveBrush() {return(GetBrush(ActiveBrush));}
|
||||
|
||||
bool CanClose() {return(SelStart==-1);}
|
||||
CPoint GetElemPos(int ID,int Width);
|
||||
|
||||
// Functions
|
||||
bool SelectCancel();
|
||||
void DeleteSet(CCore *Core);
|
||||
|
||||
virtual bool CanClose() {return(true);}
|
||||
|
||||
protected:
|
||||
|
||||
bool Select(int BrushID,bool DownFlag);
|
||||
void SetBrush(CMap &ThisBrush);
|
||||
|
||||
int CurrentSet,LastSet;
|
||||
CMap Brush[2];
|
||||
int ActiveBrush;
|
||||
int SelStart,SelEnd;
|
||||
|
||||
bool LoadFlag;
|
||||
int LastCursorPos,CursorPos;
|
||||
|
||||
CLayerTileGUI ElemStoreGUI;
|
||||
|
||||
int CurrentSet;
|
||||
bool LoadFlag;
|
||||
int CursorPos;
|
||||
CGUIElemList GUIElemList;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue