4
* Copyright (C) 2011 Tim Marston <tim@ed.am> and Dan Marston.
6
* This file is part of propeller-clock (hereafter referred to as "this
7
* program"). See http://ed.am/dev/software/arduino/propeller-clock for more
10
* This program is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU Lesser General Public License as published
12
* by the Free Software Foundation, either version 3 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Lesser General Public License for more details.
20
* You should have received a copy of the GNU Lesser General Public License
21
* along with this program. If not, see <http://www.gnu.org/licenses/>.
30
#define NUM_MESSAGE_BUFFERS 4
31
#define MESSAGE_LEN 32
37
// one of these to select face
41
// one of these to select size
46
MODE_THREEQUARTERS = 5,
49
// flag to turn on horizontal scrolling
52
// text scale constants
61
* Reset internal state, for a new text display. This deactivates all
62
* messages and they will need to be enabled again with set_up_message().
67
* Activate the display of a message and specify its display parameters.
69
* @param message_num the message to reset
70
* @param mode the new mode for this message
73
void set_up_message( int message_num, char mode, char scale = SCALE_NORMAL );
76
* After modifying a message buffer, call this to reset the internal state
77
* of the text renderer with regard to this message.
79
* @param message_num the buffer number
80
* @param pstring the PString that represents this message's buffer
82
void set_message_text( int message_num, PString &pstring );
85
* Call at the start of each frame.
90
* Call after drawing each frame
95
* Draw segment for the specified message number using whatever mode that
98
* @param segment to draw
100
void draw( int segment );
102
/** internal message buffers */
103
extern char _messages[ NUM_MESSAGE_BUFFERS ][ MESSAGE_LEN ];