2 changed files with 48 additions and 0 deletions
@ -0,0 +1,23 @@ |
|||||
|
#include "Gui.h" |
||||
|
|
||||
|
namespace ofx { |
||||
|
namespace piMapper { |
||||
|
|
||||
|
Gui * Gui::_instance = 0; |
||||
|
|
||||
|
Gui * Gui::instance(){ |
||||
|
if(_instance == 0){ |
||||
|
_instance = new ofx::piMapper::Gui(); |
||||
|
} |
||||
|
return _instance; |
||||
|
} |
||||
|
|
||||
|
void Gui::notifyEvent(ofMouseEventArgs & args){ |
||||
|
GuiEvent e; |
||||
|
e.args = args; |
||||
|
e.type = 1; |
||||
|
ofNotifyEvent(event, e, this); |
||||
|
} |
||||
|
|
||||
|
} // piMapper
|
||||
|
} // ofx
|
@ -0,0 +1,25 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "ofEvents.h" |
||||
|
|
||||
|
namespace ofx { |
||||
|
namespace piMapper { |
||||
|
|
||||
|
struct GuiEvent { |
||||
|
ofMouseEventArgs args; |
||||
|
int type; |
||||
|
}; |
||||
|
|
||||
|
class Gui { |
||||
|
public: |
||||
|
static Gui * instance(); |
||||
|
|
||||
|
ofEvent <GuiEvent> event; |
||||
|
void notifyEvent(ofMouseEventArgs & args); |
||||
|
|
||||
|
private: |
||||
|
static Gui * _instance; |
||||
|
}; |
||||
|
|
||||
|
} // piMapper
|
||||
|
} // ofx
|
Loading…
Reference in new issue