Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BrainWaveOSC/src/BrainWaveGUI/BrainWaveGUI.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
guiItems.push_back(tgtg);
numGuiItems = guiItems.size();

if(oscSendEnabled) tgtg->enableSendOSC(oscSender,false);
if(oscSendEnabled) tgtg->enableSendOSC(oscSender);

return tgtg;
}
Expand All @@ -41,7 +41,7 @@
guiItems.push_back(tgtg);
numGuiItems = guiItems.size();

if(oscSendEnabled) tgtg->enableSendOSC(oscSender,false);
if(oscSendEnabled) tgtg->enableSendOSC(oscSender);

return tgtg;
}
Expand Down
12 changes: 3 additions & 9 deletions addons/ofxThinkgear/src/ThinkgearCommsDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@

#include "ofMain.h"


#ifdef _WIN32
#include <functional> // tr1 deprecated in VS
#else
#include <tr1/functional>
#endif

#include <functional>

/*
ThinkgearCommsDriver.
Expand Down Expand Up @@ -73,15 +67,15 @@ class ThinkgearCommsDriver {
~ThinkgearCommsDriver();

bool isReady;
std::tr1::function<void(int,float)> callback;
std::function<void(int,float)> callback;
string deviceName;
int baudRate;

template <class T>
void setup(string deviceName, int baudRate,T * listener, void (T::*listenerMethod)(int,float)) {
this->deviceName = deviceName;
this->baudRate = baudRate;
callback = std::tr1::bind(listenerMethod, listener, std::tr1::placeholders::_1, std::tr1::placeholders::_2);
callback = std::bind(listenerMethod, listener, std::placeholders::_1, std::placeholders::_2);
};

bool connect();
Expand Down
2 changes: 1 addition & 1 deletion addons/ofxThinkgear/src/ofxThinkgear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void tgHandleStreamDataValueFunc( unsigned char extendedCodeLevel, unsigned char
case( 0xd4 ):
// printf("Standby... autoconnecting\n");
if(tg.allowRawDataEvents) ofNotifyEvent(tg.onConnecting, tg.values);
tg.device->writeByte(0xc2); // what is this?
tg.device->writeByte((unsigned char) 0xc2); // what is this?
break;
case( 0xd0 ):
ofNotifyEvent(tg.onReady, tg.values);
Expand Down
3 changes: 3 additions & 0 deletions addons/ofxTouchGUI/src/ofxTouchGUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,11 @@ class ofxTouchGUI {
void disableMouse();
void mouseMoved(ofMouseEventArgs& args );
void mouseDragged(ofMouseEventArgs& args);
void mouseEntered(ofMouseEventArgs& args);
void mouseExited(ofMouseEventArgs& args);
void mousePressed(ofMouseEventArgs& args);
void mouseReleased(ofMouseEventArgs& args);
void mouseScrolled(ofMouseEventArgs& args);
void touchDown(ofTouchEventArgs &touch);
void touchMoved(ofTouchEventArgs &touch);
void touchUp(ofTouchEventArgs &touch);
Expand Down
15 changes: 15 additions & 0 deletions addons/ofxTouchGUI/src/ofxTouchGUI.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1224,12 +1224,27 @@
onDown(args.x , args.y );
}

//--------------------------------------------------------------
void ofxTouchGUI::mouseEntered(ofMouseEventArgs& args){

}

//--------------------------------------------------------------
void ofxTouchGUI::mouseExited(ofMouseEventArgs& args){

}

//--------------------------------------------------------------
void ofxTouchGUI::mouseReleased(ofMouseEventArgs& args){
// offset all through touches by windowPosition
onUp(args.x , args.y );
}

//--------------------------------------------------------------
void ofxTouchGUI::mouseScrolled(ofMouseEventArgs& args){

}

// TOUCH
//--------------------------------------------------------------
void ofxTouchGUI::touchDown(ofTouchEventArgs &touch){
Expand Down
8 changes: 4 additions & 4 deletions addons/ofxTouchGUI/src/ofxTouchGUIButton.mm
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
upImage.loadImage(upImagePath);
downImage.loadImage(downImagePath);
if(useWidthHeightFromImage) {
this->width = upImage.width;
this->height = upImage.height;
this->width = upImage.getWidth();
this->height = upImage.getHeight();
}
}

Expand All @@ -36,8 +36,8 @@
this->upImage = upImage;
this->downImage = downImage;
if(useWidthHeightFromImage) {
this->width = upImage.width;
this->height = upImage.height;
this->width = upImage.getWidth();
this->height = upImage.getHeight();
}
}

Expand Down
8 changes: 4 additions & 4 deletions addons/ofxTouchGUI/src/ofxTouchGUIToggleButton.mm
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
onImage.loadImage(onImagePath);
offImage.loadImage(offImagePath);
if(useWidthHeightFromImage) {
this->width = onImage.width;
this->height = onImage.height;
this->width = onImage.getWidth();
this->height = onImage.getHeight();
}
}

Expand All @@ -43,8 +43,8 @@
this->onImage = onImage;
this->offImage = offImage;
if(useWidthHeightFromImage) {
this->width = onImage.width;
this->height = onImage.height;
this->width = onImage.getWidth();
this->height = onImage.getHeight();
}
}

Expand Down