Class: FloatingButtonTrigger

Inherits:
Trigger show all
Defined in:
lib/ruby-macrodroid/triggers.rb

Overview

Category: User Input

Instance Attribute Summary

Attributes inherited from Trigger

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Trigger

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ FloatingButtonTrigger

Returns a new instance of FloatingButtonTrigger.



1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
# File 'lib/ruby-macrodroid/triggers.rb', line 1598

def initialize(h={})

  options = {
    image_resource_id: 0,
    icon_bg_color: -9079435,
    alpha: 100,
    padding: 20,
    force_location: false,
    show_on_lock_screen: false,
    size: 0,
    transparent_background: false,
    x_location: 0,
    y_location: 0
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false) ⇒ Object Also known as: to_summary



1617
1618
1619
# File 'lib/ruby-macrodroid/triggers.rb', line 1617

def to_s(colour: false)
  'Floating Button'
end