From 98cb16388438654632fb470edecb9d803464d33b Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Thu, 2 Feb 2017 19:11:47 +0100 Subject: [PATCH] Add Application::moveTexCoord(...) --- src/Application/Application.cpp | 12 ++++++++++++ src/Application/Application.h | 1 + 2 files changed, 13 insertions(+) diff --git a/src/Application/Application.cpp b/src/Application/Application.cpp index fb18751..7708181 100644 --- a/src/Application/Application.cpp +++ b/src/Application/Application.cpp @@ -559,5 +559,17 @@ void Application::togglePause(){ } } +void Application::moveTexCoord(int texCoordIndex, ofVec2f by){ + if(texCoordIndex >= 0){ + getCmdManager()->exec(new MvTexCoordCmd(texCoordIndex, by)); + }else{ + getCmdManager()->exec(new MvAllTexCoordsCmd( + getSurfaceManager()->getSelectedSurface(), + &Gui::instance()->getTextureEditorWidget())); + + Gui::instance()->getTextureEditorWidget().moveSelection(by); + } +} + } // namespace piMapper } // namespace ofx diff --git a/src/Application/Application.h b/src/Application/Application.h index ad62955..879983e 100644 --- a/src/Application/Application.h +++ b/src/Application/Application.h @@ -126,6 +126,7 @@ class Application : public KeyListener { void removeGridRow(); void removeGridColumn(); void togglePause(); + void moveTexCoord(int texCoordIndex, ofVec2f by); void setPreset(unsigned int i); void setNextPreset();