Skip to content
Browse files

Added snazzy icons to left column

  • Loading branch information...
1 parent a3c153e commit 0a4327a5309eec13457c04042882e8cf18c40d99 @ndbroadbent committed Nov 21, 2010
Showing with 10 additions and 1 deletion.
  1. +10 −1 shell-fm_lcd_console.rb
View
11 shell-fm_lcd_console.rb
@@ -19,7 +19,6 @@
Update_delay = 4.0 # Delay between shell.fm refreshes.
Scroll_delay = 0.5 # speed of artist and title scrolling
-
# Gets info from shell-fm
def shellfm_info
# Gets the 'artist', 'title', and 'remaining seconds'
@@ -57,6 +56,10 @@ def splash_screen
# initialize Pertelian display.
$p = Pertelian.new
+# Load in some icons
+Dir.glob(File.join(File.dirname(__FILE__), 'lcd_icons', '*.chr')).each_with_index do |filename, i|
+ $p.load_char_from_file(filename, i+1)
+end
# Display initial splash screen
splash_screen
@@ -70,6 +73,12 @@ def splash_screen
@title = Widget.new(title, [3,3], 18)
@remain = Widget.new(remain, [4,3], 7, :time)
+# Display icons
+$p.write_char($p.icons["guitar"][:loc], [1,1])
+$p.write_char($p.icons["cd"][:loc], [2,1])
+$p.write_char($p.icons["notes"][:loc], [3,1])
+$p.write_char($p.icons["play"][:loc], [4,1])
+
# ------------------- Initialize threads -------------------
# Thread to periodically update our artist/title/remaining time hash and loop.

0 comments on commit 0a4327a

Please sign in to comment.
Something went wrong with that request. Please try again.