Opal::UI::Digits
Inherits Opal::UI::Element < Opal::UI::Themable < Reference < Object
Large 3x5 block character digital number and clock display inspired by Python Textual's Digits. Renders numbers 0-9, colon :, dash -, plus +, slash /, and periods in bold block characters.
Constants
GLYPH_3X5 = {'0' => ["█▀█", "█ █", "█ █", "█ █", "▀▀▀"], '1' => [" █ ", "██ ", " █ ", " █ ", "▀▀▀"], '2' => ["█▀█", " █", "█▀█", "█ ", "▀▀▀"], '3' => ["█▀█", " █", " ▀█", " █", "▀▀▀"], '4' => ["█ █", "█ █", "▀▀█", " █", " ▀"], '5' => ["█▀█", "█ ", "▀▀█", " █", "▀▀▀"], '6' => ["█▀█", "█ ", "█▀█", "█ █", "▀▀▀"], '7' => ["▀▀█", " █", " █", " █", " ▀"], '8' => ["█▀█", "█ █", "█▀█", "█ █", "▀▀▀"], '9' => ["█▀█", "█ █", "▀▀█", " █", "▀▀▀"], ':' => [" ", "●", " ", "●", " "], '.' => [" ", " ", " ", " ", "▀"], '-' => [" ", " ", "▀▀▀", " ", " "], '+' => [" ", " █ ", "▀█▀", " █ ", " "], '/' => [" █", " █", " █ ", "█ ", "█ "], '%' => ["▀ █", " █", " █ ", "█ ", "█ ▀"], ' ' => [" ", " ", " ", " ", " "]}
Constructors
Instance methods
bg
Sourcebg=(bg : Color)
Sourcebold?
Sourcefg
Sourcefg=(fg : Color)
Sourcetext
Source