Sha256: 4e8306018826f1de1c5255923d6d43ce9a2c8417757e75054c7788b0662451af

Contents?: true

Size: 912 Bytes

Versions: 1

Compression:

Stored size: 912 Bytes

Contents

class StuffPage < UnderOs::Page
  def initialize
    self.title = "Various Stuff"

    @box = View.new(style: {
      top:          50,
      left:         50,
      width:        100,
      height:       100,
      background:   :red,
      borderRadius: 10,
      borderWidth:  2,
      borderColor:  :green
    })

    @box.on(:tap){ @box.fade_out.fade_in }

    @b2 = View.new(style: {background: :blue})
    @b2.size = {x: 50, y: 50}
    @b2.position = {x: 25, y: 25}

    @b2.on(:tap, :highlight)

    insert @box.insert(@b2)

    insert Button.new(text: 'Boo Hoo!').position(x: 100, y: 200)

    insert Label.new(text: "Hey Label", style: {background: :red}).position({x: 100, y: 250})

    insert Icon.new(:cog).position(x: 50, y: 300)
    insert Icon.new(:trash).position(x: 100, y: 300)
    insert Icon.new(:home).position(x: 150, y: 300)
    insert Icon.new(:magic).position(x: 200, y: 300)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
under-os-1.0.0 app/pages/stuff_page.rb