flippy 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/README.md +7 -0
- data/lib/flippy/console.rb +3 -1
- data/lib/flippy/version.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/README.md
CHANGED
@@ -96,6 +96,13 @@ where [options] are:
|
|
96
96
|
--version, -v: Print version and exit
|
97
97
|
--help, -h: Show this message
|
98
98
|
|
99
|
+
In a flippy console, following keys works for control;
|
100
|
+
|
101
|
+
Ctrl+R, G, B: set text color in Red, Green or Blue
|
102
|
+
Ctrl+E: reset color
|
103
|
+
Ctrl+F: flush screen
|
104
|
+
<ESC>: exit
|
105
|
+
|
99
106
|
## Thank you
|
100
107
|
|
101
108
|
Thank you to Fumiaki Nishihara for disclosing a ASCII mapping table for text upside down as his blog entry;
|
data/lib/flippy/console.rb
CHANGED
@@ -5,7 +5,7 @@ $stdin.extend Termios
|
|
5
5
|
# On your terminal, try `flippy -c` then type normally.
|
6
6
|
# <ESC> key to exit.
|
7
7
|
# ^R, ^G, ^B, ^E are for setting color.
|
8
|
-
|
8
|
+
# ^F is for flush screen.
|
9
9
|
module Flippy::Console
|
10
10
|
class << self
|
11
11
|
def run
|
@@ -24,6 +24,8 @@ module Flippy::Console
|
|
24
24
|
set_color(chr)
|
25
25
|
when ctr_with('E')
|
26
26
|
reset_color
|
27
|
+
when ctr_with('F')
|
28
|
+
buffer.clear
|
27
29
|
else
|
28
30
|
buffer << chr
|
29
31
|
end
|
data/lib/flippy/version.rb
CHANGED