mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-22 07:39:59 +01:00
Changed mechanism of Source Callback and Input Mapping
Session stores list of all callback instances and reacts on input release by calling the reverse callback if it exists, or by finishing the ongoing callback. This means the behavior of Callbacks is different for those who are reversible (i.e. returns a non-null reverse) from those which do not have reverse. The reversible callbacks enforce to be exclusive while active (key pressed), others can be repeated and complementary (run in parallel).
This commit is contained in:
@@ -632,7 +632,7 @@ bool Control::receiveSourceAttribute(Source *target, const std::string &attribut
|
||||
else if ( attribute.compare(OSC_SOURCE_LOOM) == 0) {
|
||||
float x = 1.f;
|
||||
arguments >> x >> osc::EndMessage;
|
||||
target->call( new Loom(x, 0.f), true );
|
||||
target->call( new Loom(x, 0.f) );
|
||||
// this will require to send feedback status about source
|
||||
send_feedback = true;
|
||||
}
|
||||
@@ -662,7 +662,7 @@ bool Control::receiveSourceAttribute(Source *target, const std::string &attribut
|
||||
catch (osc::WrongArgumentTypeException &) {
|
||||
}
|
||||
arguments >> osc::EndMessage;
|
||||
target->call( new Grab( x, y, 0.f), true );
|
||||
target->call( new Grab( x, y, 0.f) );
|
||||
}
|
||||
/// e.g. '/vimix/current/position ff 10.0 2.2'
|
||||
else if ( attribute.compare(OSC_SOURCE_POSITION) == 0) {
|
||||
@@ -699,7 +699,7 @@ bool Control::receiveSourceAttribute(Source *target, const std::string &attribut
|
||||
catch (osc::WrongArgumentTypeException &) {
|
||||
}
|
||||
arguments >> osc::EndMessage;
|
||||
target->call( new Resize( x, y, 0.f), true );
|
||||
target->call( new Resize( x, y, 0.f) );
|
||||
}
|
||||
/// e.g. '/vimix/current/size ff 1.0 2.2'
|
||||
else if ( attribute.compare(OSC_SOURCE_SIZE) == 0) {
|
||||
@@ -730,7 +730,7 @@ bool Control::receiveSourceAttribute(Source *target, const std::string &attribut
|
||||
arguments >> osc::EndMessage;
|
||||
else
|
||||
arguments >> t >> osc::EndMessage;
|
||||
target->call( new Turn( x, t), true );
|
||||
target->call( new Turn( x, t) );
|
||||
}
|
||||
/// e.g. '/vimix/current/angle f 3.1416'
|
||||
else if ( attribute.compare(OSC_SOURCE_ANGLE) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user