class Cura::Component::Button
A button component.
Public Class Methods
new(attributes={})
click to toggle source
Calls superclass method
# File lib/cura/component/button.rb, line 28 def initialize(attributes={}) @focusable = true @foreground = Cura::Color.black @background = Cura::Color.white @focused_background = Color.new(78, 78, 78) super end
Public Instance Methods
background()
click to toggle source
# File lib/cura/component/button.rb, line 37 def background focused? ? @focused_background : get_or_inherit_color(:background, Color.black) end
click()
click to toggle source
Click this button.
@return [Button]
# File lib/cura/component/button.rb, line 44 def click application.dispatch_event(:click, target: self) self end