Folks - any help is appreciated.
Working on a couple mods, and I'm stuck at understanding how the argument values should be represented. For this particular mod, I'm making the Radio buttons in the Mirage map-able. I have all of the buttons working except for rotary knobs. I am mostly concerned with the Radio preset selector.
The Preset knob is defined as a "default_multiposition_knob". Here are the arguments for multiposition knobs.
Code:
function default_multiposition_knob(hint_,device_,command_,arg_,count_,delta_,inversed_,min_)
local min_ = min_ or 0
local delta_ = delta_ or 0.5
local inversed = 1
if inversed_ then
inversed = -1
end
return {
class = {class_type.TUMB,class_type.TUMB},
hint = hint_,
device = device_,
action = {command_,command_},
arg = {arg_,arg_},
arg_value = {-delta_ * inversed,delta_ * inversed},
arg_lim = {{min_, min_ + delta_ * (count_ -1)},
{min_, min_ + delta_ * (count_ -1)}},
updatable = true,
use_OBB = true,
cycle = true,
}
end
As you can see, the arg_values are "-delta_ * inversed,delta_ * inversed", which I don't know how to represent as values. Essentially, I want the knob to have two functions that are map-able: increase and decrease. I can make it work if I assign each of the 20 presets to a value, but of course that's stupid. Can someone help me interpolate the argument values for increase/decrease? I tried looking for other examples in the Mirage's clickabledata.lua, as well as checking the A-10, and things just aren't defined that way.
Thanks in advance.