summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorMario Kilies <MarioKilies@GMX.net>2011-01-25 23:02:40 +0100
committerMario Kilies <MarioKilies@GMX.net>2011-01-25 23:02:40 +0100
commitb3125e386140a040d8eff57ab9258eaafc60d983 (patch)
tree37f2dd7bf2c4cf45010be7b55de4dcaa0d020ab8 /src/ui.c
parent92f8870fa7a75be8458e35fb8de51965c5c33d91 (diff)
Added optional highlighting of messages in the message window.
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ui.c b/src/ui.c
index a0b8913..08ab64a 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -265,12 +265,19 @@ void ui_display_wnd_current_state(const player_list_t *pl, const uint8_t num_pla
/**
* Displays the message window.
* @param[in] message The message to display
+ * @param[in] highlight If true, the message will be highlighted
*/
-void ui_display_wnd_messages(const char *message)
+void ui_display_wnd_messages(const char *message, const bool highlight)
{
wclear(w_messages);
+
+ if (highlight)
+ wattron(w_messages, COLOR_PAIR(CP_YELLOW_ON_BLACK));
mvwprintw(w_messages, 0, 0, "%s", message);
+
+ if (highlight)
+ wattroff(w_messages, COLOR_PAIR(CP_YELLOW_ON_BLACK));
wrefresh(w_messages);
}