summaryrefslogtreecommitdiff
path: root/dalos-binaryops.lua
diff options
context:
space:
mode:
Diffstat (limited to 'dalos-binaryops.lua')
-rw-r--r--dalos-binaryops.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/dalos-binaryops.lua b/dalos-binaryops.lua
index eda76e5..095e7eb 100644
--- a/dalos-binaryops.lua
+++ b/dalos-binaryops.lua
@@ -27,6 +27,10 @@ Maximize: %b[No,Yes]{Check if you want to maximize the output}
end
end,
+ get_settings = function (self)
+ return { op = self.extra.op, maximize = self.extra.maximize }
+ end,
+
input_change = function (self, ind)
local h1 = self:get_linked_input(1)
local h2 = self:get_linked_input(2)
@@ -87,7 +91,7 @@ Maximize: %b[No,Yes]{Check if you want to maximize the output}
cv:Text(cx, cy, dalosp.binaryops.opnames[op])
end,
- create = function (d, tab)
+ create = function (d, tab, settings)
tab.ninputs = 2
tab.noutputs = 1
tab.otype = dalos.objtype.LUA_FILTER
@@ -95,7 +99,9 @@ Maximize: %b[No,Yes]{Check if you want to maximize the output}
tab.input_change = dalosp.binaryops.input_change
tab.default_name = "Binary Ops"
tab.draw = dalosp.binaryops.draw
+ tab.get_settings = dalosp.binaryops.get_settings
local extra = { }
+ if settings then extra.op = settings.op extra.maximize = settings.maximize end
local obj = dalos.object(d, tab, extra)
end,