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.



1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
# File 'lib/ruby-macrodroid/triggers.rb', line 1471

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



1490
1491
1492
# File 'lib/ruby-macrodroid/triggers.rb', line 1490

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