Sha256: ab7368c7e9e9e6247b20f05e046cbd6b312b055e660d4aa27f401a77301c82c8

Contents?: true

Size: 1.08 KB

Versions: 16

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

require 'glimmer-dsl-libui'

include Glimmer

img = image(File.expand_path('../icons/glimmer.png', __dir__), 24, 24)

data = [
  [['cat', :red]      , ['meow', :blue]                  , [true, 'mammal', :green], [img, 'Glimmer', :dark_blue], {r: 255, g: 120, b: 0, a: 0.5}],
  [['dog', :yellow]   , ['woof', {r: 240, g: 32, b: 32}] , [true, 'mammal', :green], [img, 'Glimmer', :dark_blue], :skyblue],
  [['chicken', :beige], ['cock-a-doodle-doo', :blue]     , [false, 'mammal', :red] , [img, 'Glimmer', :beige], {r: 5, g: 120, b: 110}],
  [['horse', :purple] , ['neigh', {r: 240, g: 32, b: 32}], [true, 'mammal', :green], [img, 'Glimmer', :dark_blue], '13a1fb'],
  [['cow', :gray]     , ['moo', :blue]                   , [true, 'mammal', :green], [img, 'Glimmer', :brown], 0x12ff02]
]

window('Animals', 500, 200) {
  horizontal_box {
    table {
      text_color_column('Animal')
      text_color_column('Sound')
      checkbox_text_color_column('Description')
      image_text_color_column('GUI')
      background_color_column('Mammal')

      cell_rows data
    }
  }
}.show

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
glimmer-dsl-libui-0.4.10 examples/basic_table_color.rb
glimmer-dsl-libui-0.4.9 examples/basic_table_color.rb
glimmer-dsl-libui-0.4.8 examples/basic_table_color.rb
glimmer-dsl-libui-0.4.7 examples/basic_table_color.rb
glimmer-dsl-libui-0.4.6 examples/basic_table_color.rb
glimmer-dsl-libui-0.4.5 examples/basic_table_color.rb
glimmer-dsl-libui-0.4.4 examples/basic_table_color.rb
glimmer-dsl-libui-0.4.3 examples/basic_table_color.rb
glimmer-dsl-libui-0.4.2 examples/basic_table_color.rb
glimmer-dsl-libui-0.4.1 examples/basic_table_color.rb
glimmer-dsl-libui-0.4.0 examples/basic_table_color.rb
glimmer-dsl-libui-0.3.5 examples/basic_table_color.rb
glimmer-dsl-libui-0.3.4 examples/basic_table_color.rb
glimmer-dsl-libui-0.3.3 examples/basic_table_color.rb
glimmer-dsl-libui-0.3.2 examples/basic_table_color.rb
glimmer-dsl-libui-0.3.1 examples/basic_table_color.rb