Sha256: 9969c5b8f31d94b520a288084b7fbc61ecdeae9082859e69388479a8135ebde9

Contents?: true

Size: 1.73 KB

Versions: 20

Compression:

Stored size: 1.73 KB

Contents

# frozen_string_literal: true

styles = {
  width: 199,
  height: 33,
  margin: 6,
  shadow: { blur: 9, left: 3, top: 3, id: :cell_shadow, red: 0, green: 0, blue: 0, alpha: 0.6 },
  left: 0,
  color: :yellowgreen
}

element = { width: 33,
            height: 33,
            component: { size: 11 },
            left: :center,
            top: :center,
            color: :black,
            type: :text }

listing = [
  { data: :'hello' },
  { data: :'salut', color: :red },
  { data: :hi },
  { data: :ho }
]
b = box({ drag: true })
list_1 = grab(:intuition).list({
                                 styles: styles,
                                 element: element,
                                 listing: listing,
                                 left: 33,
                                 attach: b.id,
                                 action: {touch: :down, method: :my_method }
                               })

# test2

styles = {
  width: 199,
  height: 33,
  margin: 6,
  shadow: { blur: 9, left: 3, top: 3, id: :cell_shadow, red: 0, green: 0, blue: 0, alpha: 0.6 },
  left: 0,
  color: :yellowgreen
}

element = { width: 25,
            height: 25,
            smooth: '100%',
            center: { x: 0, y: 0, dynamic: true },
            # left: 10,
            # top: :center,
            color: :orange,
            type: :shape
}

listing = [
  { smooth: '100%' },
  { color: :red, data: :poilu },
  {},
  {},

  { width: 33 },
  {},
]
def my_method(val=nil)
  alert "so_cool : #{val}"
end

list_2 = A.list({ left: 300,
                  styles: styles,
                  element: element,
                  listing: listing,
                  action: {touch: :down, method: :my_method }
                })
wait 1 do
  list_2.left(list_1.width)
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
atome-0.5.7.6.0 vendor/assets/application/examples/list.rb
atome-0.5.7.5.9 vendor/assets/application/examples/list.rb
atome-0.5.7.5.4 vendor/assets/application/examples/list.rb
atome-0.5.7.5.3 vendor/assets/application/examples/list.rb
atome-0.5.7.5.1 vendor/assets/application/examples/list.rb
atome-0.5.7.4.8 vendor/assets/application/examples/list.rb
atome-0.5.7.4.7 vendor/assets/application/examples/list.rb
atome-0.5.7.4.6 vendor/assets/application/examples/list.rb
atome-0.5.7.4.3 vendor/assets/application/examples/list.rb
atome-0.5.7.4.2 vendor/assets/application/examples/list.rb
atome-0.5.7.3.9 vendor/assets/application/examples/list.rb
atome-0.5.7.3.6 vendor/assets/application/examples/list.rb
atome-0.5.7.3.5 vendor/assets/application/examples/list.rb
atome-0.5.7.3.3 vendor/assets/application/examples/list.rb
atome-0.5.7.3.2 vendor/assets/application/examples/list.rb
atome-0.5.7.3.1 vendor/assets/application/examples/list.rb
atome-0.5.7.3.0 vendor/assets/application/examples/list.rb
atome-0.5.7.1.8 vendor/assets/application/examples/list.rb
atome-0.5.7.1.7 vendor/assets/application/examples/list.rb
atome-0.5.7.1.0 vendor/assets/application/examples/list.rb