UI button programming
I'm trying to grab a number from the user, default of 1, with buttons next to it that increase or decrease that number
I don't believe I'm even close yet, the number displayed in the UI doesn't change here, also, I'm not sure it's even a number, but text instead. I'm still very new at this, everything is probably pretty crude.
w = new Window('dialog', "Gadget");
w.grp1 = w.add('group');
w.grp1.orientation = "row";
w.grp1.alignment = "right";
w.grp1.add("statictext", undefined, "Left Offset:");
var leftoffset = w.grp1.add("edittext", undefined, 1);
leftoffset.characters = 3;
leftoffset.active = true;
var grp1up = w.grp1.add("button", undefined, "+");
grp1up.onClick = leftoffset = leftoffset + 1;
var grp1down = w.grp1.add("button", undefined, "-");
grp1up.onClick = leftoffset = leftoffset - 1;
Another later goal is to have a checkbox in the UI near the beginning, that allows the button presses to increase the numbers by 0.25's instead of 1's
