Sha256: 112dea2f330e5427313339cfc38abf7eb19be3c7e121a2d685dedbdb71fc591c

Contents?: true

Size: 448 Bytes

Versions: 3

Compression:

Stored size: 448 Bytes

Contents

class Shoes
  class Progress
    include Common::UIElement
    include Common::Style

    style_with :common_styles, :dimensions, :fraction
    STYLES = { fraction: 0.0 }

    def after_initialize(*_)
      @gui.fraction = @style[:fraction]
      update_visibility
    end

    def handle_block(*_)
      # No-op since we're not clickable
    end

    def fraction=(value)
      style(fraction: value)
      @gui.fraction = value
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shoes-core-4.0.0.pre6 lib/shoes/progress.rb
shoes-core-4.0.0.pre5 lib/shoes/progress.rb
shoes-core-4.0.0.pre4 lib/shoes/progress.rb