summaryrefslogtreecommitdiff
path: root/client/lua.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/lua.cc')
-rw-r--r--client/lua.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/client/lua.cc b/client/lua.cc
index 22249a4..65d0188 100644
--- a/client/lua.cc
+++ b/client/lua.cc
@@ -28,6 +28,8 @@
#include "macrowindow.h"
+#include "widgets/widget.h"
+
#define GLOBAL_POINTER "_pracroGlobalLUAObjectPointerThisShouldBeANameThatIsNotAccidentallyOverwritten"
static int _enable(lua_State *L)
@@ -170,22 +172,27 @@ LUA::~LUA()
QString LUA::getValue(QString name)
{
- return macrowindow->getValue(name);
+ Widget *widget = macrowindow->getWidget(name);
+ if(widget) return widget->getValue();
+ return "";
}
void LUA::setValue(QString name, QString value)
{
- macrowindow->setValue(name, value);
+ Widget *widget = macrowindow->getWidget(name);
+ if(widget) return widget->setValue(value);
}
void LUA::enable(QString name)
{
- return macrowindow->enable(name);
+ Widget *widget = macrowindow->getWidget(name);
+ if(widget) return widget->enable();
}
void LUA::disable(QString name)
{
- return macrowindow->disable(name);
+ Widget *widget = macrowindow->getWidget(name);
+ if(widget) return widget->disable();
}
bool LUA::run(QString program, QString name, QString value)