diff --git a/src/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index 0ae9fd6f4..a6aebc0a5 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -76,18 +76,28 @@ void wait_for_enter () //////////////////////////////////////////////////////////////////////////////// // Holds information about single improvement / bug. // -NewsItem::NewsItem (bool major, const std::string& title, const std::string& update) { +NewsItem::NewsItem ( + bool major, + const std::string& title, + const std::string& update, + const std::string& reasoning, + const std::string& actions +) { _major = major; _title = title; _update = update; + _reasoning = reasoning; + _actions = actions; } void NewsItem::render () { auto config = Context::getContext ().config; Color header; Color bold; + Color underline; if (Context::getContext ().color ()) { bold = Color ("bold"); + underline = Color ("underline"); if (config.has ("color.header")) header = Color (config.get ("color.header")); } @@ -96,6 +106,12 @@ void NewsItem::render () { // Apply this workaround of colorizing twice. std::cout << bold.colorize (header.colorize (format ("{1}\n", _title))); std::cout << format ("\n{1}\n", _update); + if (_reasoning.size ()) + std::cout << "\n " << underline.colorize ("What is the motivation for this feature?\n") + << _reasoning << std::endl; + if (_actions.size ()) + std::cout << "\n " << underline.colorize ("What do I have to do?\n") + << _actions << std::endl; } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/CmdNews.h b/src/commands/CmdNews.h index 3c80f5832..50f1d6a98 100644 --- a/src/commands/CmdNews.h +++ b/src/commands/CmdNews.h @@ -36,7 +36,9 @@ public: bool _major = false; std::string _title; std::string _update; - NewsItem (bool, const std::string&, const std::string&); + std::string _reasoning; + std::string _actions; + NewsItem (bool, const std::string&, const std::string&, const std::string& = "", const std::string& = ""); void render (); };