From 19be92e0aff674b95bdae72fe7a2e409fd1bf77a Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 17 Apr 2023 19:44:00 +0100 Subject: add to archive --- FESgui/src/selectpanel.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 FESgui/src/selectpanel.h (limited to 'FESgui/src/selectpanel.h') diff --git a/FESgui/src/selectpanel.h b/FESgui/src/selectpanel.h new file mode 100644 index 0000000..a6811bc --- /dev/null +++ b/FESgui/src/selectpanel.h @@ -0,0 +1,53 @@ +#pragma once + +#include "ofMain.h" +#include "ofxGui.h" + +/* a gui panel that receives key and drag events. */ + +class selectPanel : public ofxPanel { + public: + selectPanel(string _name=""){ + name=_name; + ofRegisterKeyEvents(this, defaultEventsPriority); + ofRegisterDragEvents(this, defaultEventsPriority); + } + bool mouseMoved(ofMouseEventArgs & args){ + if (args.x>getPosition().x&& + args.x-getPosition().xgetPosition().y&& + args.y-getPosition().y "<getPosition().x&& + dragInfo.position.x-getPosition().xgetPosition().y&& + dragInfo.position.y-getPosition().y "<