From 9a073b255a621657c635a4881d27bb3b6a1a2cf8 Mon Sep 17 00:00:00 2001
From: Krisjanis Rijnieks <krisjanis.rijnieks@gmail.com>
Date: Wed, 17 Feb 2016 19:59:27 +0100
Subject: [PATCH] Remove gui test event

---
 src/Application/Application.cpp | 9 +--------
 src/Application/Application.h   | 2 +-
 src/Application/Gui.cpp         | 7 -------
 src/Application/Gui.h           | 3 ---
 4 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/src/Application/Application.cpp b/src/Application/Application.cpp
index 7c9579d..251245c 100644
--- a/src/Application/Application.cpp
+++ b/src/Application/Application.cpp
@@ -15,7 +15,6 @@ Application::Application(){
 	ofAddListener(ofEvents().keyReleased, this, &Application::onKeyReleased);
 	ofAddListener(ofEvents().mousePressed, this, &Application::onMousePressed);
 	
-	ofAddListener(Gui::instance()->event, this, &Application::onGuiEvent);
 	ofAddListener(Gui::instance()->jointPressedEvent, this, &Application::onJointPressed);
 	ofAddListener(Gui::instance()->surfacePressedEvent, this, &Application::onSurfacePressed);
 	ofAddListener(Gui::instance()->backgroundPressedEvent, this, &Application::onBackgroundPressed);
@@ -116,13 +115,7 @@ void Application::onKeyReleased(ofKeyEventArgs & args){
 	}
 }
 
-void Application::onMousePressed(ofMouseEventArgs & args){
-	Gui::instance()->notifyEvent(args);
-}
-
-void Application::onGuiEvent(GuiEvent & e){
-	cout << "GUI EVENT: " << e.args.x << ", " << e.args.y << ", " << e.type << endl;
-}
+void Application::onMousePressed(ofMouseEventArgs & args){}
 
 void Application::onJointPressed(GuiJointEvent & e){
 	_state->onJointPressed(this, e);
diff --git a/src/Application/Application.h b/src/Application/Application.h
index 8a94e80..b2ef8c6 100644
--- a/src/Application/Application.h
+++ b/src/Application/Application.h
@@ -44,8 +44,8 @@ class Application : public KeyListener {
 	
 		// We use this to pass mouse events into the GUI layer
 		void onMousePressed(ofMouseEventArgs & args);
+	
 		// Then we catch GUI events with this one and create commands
-		void onGuiEvent(GuiEvent & e);
 		void onJointPressed(GuiJointEvent & e);
 		void onSurfacePressed(GuiSurfaceEvent & e);
 		void onBackgroundPressed(GuiBackgroundEvent & e);
diff --git a/src/Application/Gui.cpp b/src/Application/Gui.cpp
index a4d10c7..3ed3f7e 100644
--- a/src/Application/Gui.cpp
+++ b/src/Application/Gui.cpp
@@ -12,13 +12,6 @@ Gui * Gui::instance(){
 	return _instance;
 }
 
-void Gui::notifyEvent(ofMouseEventArgs & args){
-	GuiEvent e;
-	e.args = args;
-	e.type = GuiEventType::SURFACE_HIT;
-	ofNotifyEvent(event, e, this);
-}
-
 void Gui::notifyJointPressed(ofMouseEventArgs & args, int jointIndex){
 	GuiJointEvent e;
 	e.args = args;
diff --git a/src/Application/Gui.h b/src/Application/Gui.h
index f8859b6..48b0eab 100644
--- a/src/Application/Gui.h
+++ b/src/Application/Gui.h
@@ -37,9 +37,6 @@ class Gui {
 	public:
 		static Gui * instance();
 	
-		ofEvent <GuiEvent> event;
-		void notifyEvent(ofMouseEventArgs & args);
-	
 		// TODO: combine the following events into one
 		ofEvent <GuiJointEvent> jointPressedEvent;
 		ofEvent <GuiJointEvent> jointReleasedEvent;