Permalink
Browse files

fix crash when using LIGH (base class should be ElementTool, not Tool)

  • Loading branch information...
jacob1 committed Aug 28, 2015
1 parent 2be317e commit 052681ef2bfae221f450319f03b29376b057f501
Showing with 13 additions and 13 deletions.
  1. +13 −13 src/gui/game/Tool.h
@@ -102,19 +102,6 @@ class PropertyTool: public Tool
virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position);
};
class Element_LIGH_Tool: public Tool
{
public:
Element_LIGH_Tool(int id, string name, string description, int r, int g, int b, std::string identifier, VideoBuffer * (*textureGen)(int, int, int) = NULL):
Tool(id, name, description, r, g, b, identifier, textureGen)
{ }
virtual ~Element_LIGH_Tool() { }
virtual void Click(Simulation * sim, Brush * brush, ui::Point position) { }
virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2, bool dragging = false);
virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { }
virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { }
};
class ElementTool: public Tool
{
@@ -127,6 +114,19 @@ class ElementTool: public Tool
virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position);
};
class Element_LIGH_Tool: public ElementTool
{
public:
Element_LIGH_Tool(int id, string name, string description, int r, int g, int b, std::string identifier, VideoBuffer * (*textureGen)(int, int, int) = NULL):
ElementTool(id, name, description, r, g, b, identifier, textureGen)
{ }
virtual ~Element_LIGH_Tool() { }
virtual void Click(Simulation * sim, Brush * brush, ui::Point position) { }
virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2, bool dragging = false);
virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { }
virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { }
};
class Element_TESC_Tool: public ElementTool
{
public:

0 comments on commit 052681e

Please sign in to comment.