2025-03-14 20:29:05 +02:00

1.4 KiB

druid.swipe API

at /druid/extended/swipe.lua

Functions

Fields

init


swipe:init(node_or_node_id, on_swipe_callback)
  • Parameters:
    • node_or_node_id (string|node):
    • on_swipe_callback (function):

on_late_init


swipe:on_late_init()

on_style_change


swipe:on_style_change(style)
  • Parameters:
    • style (druid.swipe.style):

on_input


swipe:on_input(action_id, action)
  • Parameters:

    • action_id (hash):
    • action (action):
  • Returns:

    • `` (boolean):

on_input_interrupt


swipe:on_input_interrupt()

set_click_zone


swipe:set_click_zone([zone])

Strict swipe click area. Useful for restrict events outside stencil node

  • Parameters:
    • [zone] (string|node|nil): Gui node

Fields

  • node (node)

  • on_swipe (event): function(side, dist, dt), side - "left", "right", "up", "down"

  • style (table)

  • click_zone (node)