From 9a8aff54ff8ee7dc38369686f273ec282786e7c5 Mon Sep 17 00:00:00 2001 From: andreja6 Date: Fri, 13 Mar 2020 10:08:03 -0700 Subject: [PATCH] Added change tool function --- Application.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Application.cpp b/Application.cpp index a1e1de4..023558f 100644 --- a/Application.cpp +++ b/Application.cpp @@ -483,6 +483,15 @@ void Application::onUserInput(UserInput* ui) { // Add other key handling here } +void Application::changeTool(Tool * newTool) +{ + delete tool; + if(newTool != NULL) + tool = newTool; + else + tool = new Tool(); //Nulltool +} + void Application::makeFlag(Vector3 &vec, RenderDevice* &rd) {