diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-26 15:16:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-26 15:16:36 +0100 |
| commit | 5ba33f846129f3e6c0505b19f94634b24505e828 (patch) | |
| tree | aaacabe678006040c342935481a86607c66607fd /src/managers/input/trackpad/gestures/LuaFunctionGesture.cpp | |
| parent | 329b2b356dd92ac07f4e2aa69cbce82ee9ba9d19 (diff) | |
config/lua: init lua config manager, use lua if available (#13817)
Adds a new lua config manager, which will automatically be used if there is a lua config present.
Diffstat (limited to 'src/managers/input/trackpad/gestures/LuaFunctionGesture.cpp')
| -rw-r--r-- | src/managers/input/trackpad/gestures/LuaFunctionGesture.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/managers/input/trackpad/gestures/LuaFunctionGesture.cpp b/src/managers/input/trackpad/gestures/LuaFunctionGesture.cpp new file mode 100644 index 00000000..66f3dd48 --- /dev/null +++ b/src/managers/input/trackpad/gestures/LuaFunctionGesture.cpp @@ -0,0 +1,22 @@ +#include "LuaFunctionGesture.hpp" + +#include "../../../../config/lua/ConfigManager.hpp" + +CLuaFunctionGesture::CLuaFunctionGesture(int ref) : m_luaFnId(ref) { + ; +} + +void CLuaFunctionGesture::begin(const ITrackpadGesture::STrackpadGestureBegin& e) { + ; // intentionally blank +} + +void CLuaFunctionGesture::update(const ITrackpadGesture::STrackpadGestureUpdate& e) { + ; // intentionally blank +} + +void CLuaFunctionGesture::end(const ITrackpadGesture::STrackpadGestureEnd& e) { + if (!Config::Lua::mgr()) + return; + + Config::Lua::mgr()->callLuaFn(m_luaFnId); +} |
