From b3125e386140a040d8eff57ab9258eaafc60d983 Mon Sep 17 00:00:00 2001 From: Mario Kilies Date: Tue, 25 Jan 2011 23:02:40 +0100 Subject: Added optional highlighting of messages in the message window. --- src/ui.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/ui.c') 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); } -- cgit v1.2.3