Sha256: fdcb6dded0074ea8a4fcd227516aff096b47493351a7e5dc65432b459c102828

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

#!/usr/bin/env ruby

# Emoji Keyboard Example
#
# A simple example that will output the selected emoji to STDOUT and a also to
# a seperate pane.

require 'flammarion'

f = Flammarion::Engraving.new
f.style "font-size", "200%"
f.pane("output", weight: 0.1).send("> ")
f.emoji.keys.each do |emoji|
  f.button(emoji, escape_icons: true, inline: true) do
    unicode_char = f.emoji[emoji]['unicode'].last.split("-").map(&:hex).pack("U")
    f.pane("output").send unicode_char
    f.status(f.emoji[emoji]['unicode'].last)
    print unicode_char
  end
end

f.wait_until_closed

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flammarion-utils-0.3.0 bin/emoji-keyboard