Sha256: fd51f306c1219f6e566c21ac4bcc3a1257a6bc985bafdc8a7eb8730754e4d125
Contents?: true
Size: 955 Bytes
Versions: 2
Compression:
Stored size: 955 Bytes
Contents
# frozen_string_literal: true require_relative "text_record" module Fusuma module Plugin module Events module Records # Gesture Record class GestureRecord < Record # define gesture format attr_reader :status, :gesture, :finger, :delta Delta = Struct.new( :move_x, :move_y, :unaccelerated_x, :unaccelerated_y, :zoom, :rotate ) # @param status [String] # @param gesture [String] # @param finger [String, Integer] # @param delta [Delta, NilClass] def initialize(status:, gesture:, finger:, delta:) super() @status = status @gesture = gesture @finger = finger.to_i @delta = delta end def to_s "#{@gesture}, #{@finger}, #{@status}, #{@delta}" end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fusuma-3.5.0 | lib/fusuma/plugin/events/records/gesture_record.rb |
fusuma-3.4.0 | lib/fusuma/plugin/events/records/gesture_record.rb |