f44db83b25
From https://github.com/Juanvvc/c172p-detailed/ release/2016.1 commit 3f33b88bb015a8ee685ab3178932d16d6e072410 A big Thank-You to the c172p-detailed team for their ongoing work.
51 lines
1.4 KiB
Text
51 lines
1.4 KiB
Text
# Copyright (C) 2014 onox
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
var error = func (message) {
|
|
var string = sprintf("Error: %s", message);
|
|
print(globals.string.color("31;40;1", string));
|
|
};
|
|
|
|
var warn = func (message) {
|
|
var string = sprintf("Warning: %s", message);
|
|
print(globals.string.color("33;40;1", string));
|
|
};
|
|
|
|
var info = func (message) {
|
|
var string = sprintf("Info: %s", message);
|
|
print(globals.string.color("37;40;1", string));
|
|
};
|
|
|
|
var screen = {
|
|
|
|
# Print colored text on the screen
|
|
|
|
red: func (message) {
|
|
globals.screen.log.write(message, 1, 0, 0);
|
|
},
|
|
|
|
green: func (message) {
|
|
globals.screen.log.write(message, 0, 1.0, 0);
|
|
},
|
|
|
|
blue: func (message) {
|
|
globals.screen.log.write(message, 0, 0.584, 1);
|
|
},
|
|
|
|
white: func (message) {
|
|
globals.screen.log.write(message, 1, 1, 1);
|
|
}
|
|
|
|
};
|