Sha256: 350ba0f52e90eb96d20070e00f7c2019c527df837a076bd4cf16c43289172580
Contents?: true
Size: 586 Bytes
Versions: 1
Compression:
Stored size: 586 Bytes
Contents
# frozen_string_literal: true class Shoes class Button < Common::UIElement include Common::Clickable include Common::Focus include Common::State # We don't actually support release from buttons, but want to use the # shared infrastructure for clicking. So just get rid of release post def. undef release style_with :click, :common_styles, :dimensions, :state, :text def before_initialize(styles, text) styles[:text] = text || 'Button' end def text=(value) style(text: value.to_s) @gui.text = value.to_s end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shoes-core-4.0.0.rc1 | lib/shoes/button.rb |