src/interface.rsView |
---|
71 | 71 … | match interface_message { |
72 | 72 … | InterfaceMessage::Time(time) => { |
73 | 73 … | ncurses::clear(); |
74 | 74 … | ncurses::mv(0, 0); |
75 | | - if time.ticks == 0 { |
76 | | - ncurses::printw("BEAT"); |
77 | | - } |
78 | | - ncurses::printw("\n"); |
| 75 … | + print_beat(time); |
| 76 … | + print_bar(time); |
79 | 77 … | print_time(time); |
80 | 78 … | print_signature(signature); |
81 | 79 … | }, |
82 | 80 … | InterfaceMessage::Signature(signature) => { |
90 | 88 … | interface |
91 | 89 … | } |
92 | 90 … | } |
93 | 91 … | |
| 92 … | +pub fn print_beat (time: clock::ClockTime) { |
| 93 … | + if time.ticks == 0 { |
| 94 … | + if time.beats == 0 { |
| 95 … | + ncurses::printw("SUPER "); |
| 96 … | + } |
| 97 … | + ncurses::printw("BEAT"); |
| 98 … | + } |
| 99 … | + ncurses::printw("\n"); |
| 100 … | +} |
| 101 … | + |
| 102 … | +pub fn print_bar (time: clock::ClockTime) { |
| 103 … | + if time.bars == 0 { |
| 104 … | + ncurses::printw("YAY YAY YAY"); |
| 105 … | + } |
| 106 … | + ncurses::printw("\n"); |
| 107 … | +} |
| 108 … | + |
94 | 109 … | pub fn print_time (time: clock::ClockTime) { |
95 | 110 … | ncurses::printw("nanos: "); |
96 | 111 … | ncurses::printw(format!("{}\n", time.nanos).as_ref()); |
|
97 | 112 … | ncurses::printw("ticks: "); |