refactor to have a single global current brush on Canvas::m_current_brush and make panels read from it for drawing instead of relying on their own copy

This commit is contained in:
2017-11-07 09:14:02 +00:00
parent 3e546affc9
commit 53062711fa
13 changed files with 79 additions and 89 deletions

View File

@@ -88,6 +88,8 @@ public:
glm::vec3 m_cam_pos;
float m_cam_fov = 85;
Brush m_current_brush;
enum class kCanvasMode { Draw, Erase, Line, Camera, Grid, Fill, MaskFree, MaskLine, COUNT };
kCanvasMode m_state{ kCanvasMode::Draw };
static std::vector<CanvasMode*> modes[];