Cleanup lambda expressions and directly address Fadeable properties when adding properties

This commit is contained in:
Alexander Bock
2023-04-12 23:20:53 +02:00
parent 19642e8120
commit 7565a91196
67 changed files with 229 additions and 212 deletions

View File

@@ -78,7 +78,7 @@ TouchModule::TouchModule()
addPropertySubOwner(_touch);
addPropertySubOwner(_markers);
addProperty(_touchIsEnabled);
_touchIsEnabled.onChange([&]() {
_touchIsEnabled.onChange([this]() {
_touch.resetAfterInput();
_lastTouchInputs.clear();
});
@@ -86,7 +86,7 @@ TouchModule::TouchModule()
_hasActiveTouchEvent.setReadOnly(true);
addProperty(_hasActiveTouchEvent);
_defaultDirectTouchRenderableTypes.onChange([&]() {
_defaultDirectTouchRenderableTypes.onChange([this]() {
_sortedDefaultRenderableTypes.clear();
for (const std::string& s : _defaultDirectTouchRenderableTypes.value()) {
ghoul::TemplateFactory<Renderable>* fRenderable =
@@ -118,7 +118,7 @@ bool TouchModule::isDefaultDirectTouchType(std::string_view renderableType) cons
void TouchModule::internalInitialize(const ghoul::Dictionary&){
_ear.reset(new TuioEar());
global::callback::initializeGL->push_back([&]() {
global::callback::initializeGL->push_back([this]() {
LDEBUG("Initializing TouchMarker OpenGL");
_markers.initialize();
#ifdef WIN32
@@ -131,7 +131,7 @@ void TouchModule::internalInitialize(const ghoul::Dictionary&){
#endif
});
global::callback::deinitializeGL->push_back([&]() {
global::callback::deinitializeGL->push_back([this]() {
LDEBUG("Deinitialize TouchMarker OpenGL");
_markers.deinitialize();
});
@@ -157,7 +157,7 @@ void TouchModule::internalInitialize(const ghoul::Dictionary&){
);
global::callback::preSync->push_back([&]() {
global::callback::preSync->push_back([this]() {
if (!_touchIsEnabled) {
return;
}
@@ -193,7 +193,7 @@ void TouchModule::internalInitialize(const ghoul::Dictionary&){
clearInputs();
});
global::callback::render->push_back([&]() {
global::callback::render->push_back([this]() {
_markers.render(_touchPoints);
});
}