Merge pull request #814 from Blizzard/premake-info

Add premake.info message function.
This commit is contained in:
Tom van Dijck 2017-06-18 12:49:10 -07:00 committed by GitHub
commit 8e083bba09
2 changed files with 18 additions and 0 deletions

View File

@ -361,6 +361,23 @@
end
--
-- Display information in the term.infoColor color.
--
-- @param message
-- The info message, which may contain string formatting tokens.
-- @param ...
-- Values to fill in the string formatting tokens.
--
function premake.info(message, ...)
message = string.format(message, ...)
term.pushColor(term.infoColor)
io.stdout:write(string.format("** Info: " .. message .. "\n", ...))
term.popColor();
end
--
-- A shortcut for printing formatted output.

View File

@ -25,6 +25,7 @@ term.white = 15
-- colors for specific purpose.
term.warningColor = term.magenta
term.errorColor = term.lightRed
term.infoColor = term.lightCyan
-- color stack implementation.
term._colorStack = {}