Sha256: b459a80ea81313a2e832675988d10103625b5c5a13492bd1d27cb5b738e7f4ba

Contents?: true

Size: 512 Bytes

Versions: 1

Compression:

Stored size: 512 Bytes

Contents

require 'purple_shoes'

Shoes.app width: 200, height: 200 do
  background mintcream
  flow margin: 5 do
    flow height: 190 do
      background File.join(DIR, '../samples/shell.png'), curve: 5
      @line = para strong(' ' * 300), stroke: white
      @line.text = ''
      @line.cursor = -1
    end
  end

  keypress do |k|
    msg = case k
      when "\b"; @line.text[0..-2]
      else
        k.length == 1 ? @line.text + k : nil
    end
    @line.text = msg if msg
    flush
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
purple_shoes-0.7.166 samples/sample51.rb