option for playermat snap tags added
This commit is contained in:
parent
5231609f44
commit
d4a41b7b02
@ -613,10 +613,19 @@ function onClick_toggleOption(_, id)
|
|||||||
optionPanel[id] = state
|
optionPanel[id] = state
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local PlayerMatAPI = require("playermat/PlaymatApi")
|
||||||
function onClick_applySettings()
|
function onClick_applySettings()
|
||||||
print("Enabling following settings:")
|
printToAll("---------------------", "White")
|
||||||
for id, value in pairs(optionPanel) do
|
printToAll("Applying settings...", "White")
|
||||||
if value then print(id) end
|
for id, state in pairs(optionPanel) do
|
||||||
|
if state then print(id) end
|
||||||
|
|
||||||
|
-- option 1: Snap tags
|
||||||
|
if id == "1" then
|
||||||
|
printToAll("Playermat snap tags " .. (state and "en" or "dis") .."abled.", "White")
|
||||||
|
PlayerMatAPI.setLimitSnapsByType(state, "All")
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
<TableLayout padding="20" cellPadding="10" cellSpacing="10">
|
<TableLayout padding="20" cellPadding="10" cellSpacing="10">
|
||||||
<Row class="tblRow">
|
<Row class="tblRow">
|
||||||
<Cell>
|
<Cell>
|
||||||
<Toggle id="toggle1" onValueChanged="onClick_toggleOption(1)">Toggle Text 1</Toggle>
|
<Toggle id="toggle1" onValueChanged="onClick_toggleOption(1)">Playermats: Snap tags for 'Assets'</Toggle>
|
||||||
</Cell>
|
</Cell>
|
||||||
<Cell>
|
<Cell>
|
||||||
<Toggle id="toggle2" onValueChanged="onClick_toggleOption(2)">Toggle Text 2</Toggle>
|
<Toggle id="toggle2" onValueChanged="onClick_toggleOption(2)">Toggle Text 2</Toggle>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user