Dial click rotate

From Sim Innovations Wiki
Jump to navigation Jump to search

Description

dial_click_rotate(dial_id,degrees_delta)

dial_click_rotate is used to set the number of degrees the dial should rotate on each click.

Return value

This function won't return any value.

Arguments

# Argument Type Description
1 dial_id Number Reference to the dial
2 degrees_delta Number The number of degrees the dial should rotate on each click.

Example

function callback(direction)
  print("dial has been turned into direction " .. direction)
end
 
dial_id = dial_add("a.png", 100,100,100,100,callback)

-- Set the dial to rotate 20 degrees, every time someone clicks the dial
dial_click_rotate(dial_id, 20)