|
|
|
|
@ -6,6 +6,8 @@ function initUi() |
|
|
|
|
app.registerUi({["menu"] = "Color 2", ["callback"] = "colorTwo", ["accelerator"] = "F16"}); |
|
|
|
|
app.registerUi({["menu"] = "Color 3", ["callback"] = "colorThree", ["accelerator"] = "F17"}); |
|
|
|
|
app.registerUi({["menu"] = "Color 4", ["callback"] = "colorFour", ["accelerator"] = "F18"}); |
|
|
|
|
app.registerUi({["menu"] = "Solid", ["callback"] = "solid", ["accelerator"] = "<Alt>F15"}); |
|
|
|
|
app.registerUi({["menu"] = "dash", ["callback"] = "dash", ["accelerator"] = "<Alt>F16"}); |
|
|
|
|
-- if you want to have multiple color lists you must use the app.registerUi function multiple times |
|
|
|
|
-- with different callback functions and accelerators |
|
|
|
|
end |
|
|
|
|
@ -46,6 +48,13 @@ function colorFour() |
|
|
|
|
app.changeToolColor({["color"] = colorList[currentColor][2], ["selection"] = true}) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
function solid() |
|
|
|
|
app.uiAction({["action"]="ACTION_TOOL_LINE_STYLE_PLAIN"}) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
function dash() |
|
|
|
|
app.uiAction({["action"]="ACTION_TOOL_LINE_STYLE_DOT"}) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
function cycle() |
|
|
|
|
if (currentColor < #colorList) then |
|
|
|
|
|