From 1479a5e134004568245996a22418dadb6b6da6f6 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 15 Nov 2014 23:47:27 +0000 Subject: Added /roster size and /occupants size settings --- src/ui/console.c | 6 ++++++ src/ui/window.c | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/ui') diff --git a/src/ui/console.c b/src/ui/console.c index d4f6bcc9..9f9b9e2a 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -883,6 +883,9 @@ _cons_occupants_setting(void) cons_show("Occupants (/occupants) : show"); else cons_show("Occupants (/occupants) : hide"); + + int size = prefs_get_occupants_size(); + cons_show("Occupants size (/occupants) : %d", size); } static void @@ -958,6 +961,9 @@ _cons_roster_setting(void) cons_show("Roster resource (/roster) : show"); else cons_show("Roster resource (/roster) : hide"); + + int size = prefs_get_roster_size(); + cons_show("Roster size (/roster) : %d", size); } static void diff --git a/src/ui/window.c b/src/ui/window.c index 13b84b73..4cd2af66 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -53,9 +53,6 @@ #define CEILING(X) (X-(int)(X) > 0 ? (int)(X+1) : (int)(X)) -static int roster_win_percent = 20; -static int occupants_win_percent = 20; - static void _win_print(ProfWin *window, const char show_char, const char * const date_fmt, int flags, int attrs, const char * const from, const char * const message); static void _win_print_wrapped(WINDOW *win, const char * const message); @@ -63,6 +60,7 @@ static void _win_print_wrapped(WINDOW *win, const char * const message); int win_roster_cols(void) { + int roster_win_percent = prefs_get_roster_size(); int cols = getmaxx(stdscr); return CEILING( (((double)cols) / 100) * roster_win_percent); } @@ -70,6 +68,7 @@ win_roster_cols(void) int win_occpuants_cols(void) { + int occupants_win_percent = prefs_get_occupants_size(); int cols = getmaxx(stdscr); return CEILING( (((double)cols) / 100) * occupants_win_percent); } -- cgit 1.4.1-2-gfad0