Sha256: e38fe386ce393a553d05b493ea3208ea43d95118f17039a8dde24c4b5f6e4f28

Contents?: true

Size: 1.16 KB

Versions: 72

Compression:

Stored size: 1.16 KB

Contents

require 'glimmer-dsl-libui'

include Glimmer

img = [File.expand_path('../icons/glimmer.png', __dir__), 24, 24] # scales image to 24x24 (can be passed as file path String only instead of Array to avoid scaling)

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 # must be the last column

      cell_rows data
    }
  }
}.show

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
glimmer-dsl-libui-0.7.8 examples/basic_table_color2.rb
glimmer-dsl-libui-0.7.7 examples/basic_table_color2.rb
glimmer-dsl-libui-0.7.6 examples/basic_table_color2.rb
glimmer-dsl-libui-0.7.5 examples/basic_table_color2.rb
glimmer-dsl-libui-0.7.4 examples/basic_table_color2.rb
glimmer-dsl-libui-0.7.3 examples/basic_table_color2.rb
glimmer-dsl-libui-0.7.2 examples/basic_table_color2.rb
glimmer-dsl-libui-0.7.1 examples/basic_table_color2.rb
glimmer-dsl-libui-0.7.0 examples/basic_table_color2.rb
glimmer-dsl-libui-0.6.2 examples/basic_table_color2.rb
glimmer-dsl-libui-0.6.1 examples/basic_table_color2.rb
glimmer-dsl-libui-0.6.0 examples/basic_table_color2.rb
glimmer-dsl-libui-0.6.0.pre.3 examples/basic_table_color2.rb
glimmer-dsl-libui-0.6.0.pre.2 examples/basic_table_color2.rb
glimmer-dsl-libui-0.6.0.pre.1 examples/basic_table_color2.rb
glimmer-dsl-libui-0.6.0.pre.0 examples/basic_table_color2.rb
glimmer-dsl-libui-0.5.24 examples/basic_table_color2.rb
glimmer-dsl-libui-0.5.23 examples/basic_table_color2.rb
glimmer-dsl-libui-0.5.22 examples/basic_table_color2.rb
glimmer-dsl-libui-0.5.21 examples/basic_table_color2.rb