summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorMario Kilies <MarioKilies@GMX.net>2011-01-31 19:02:08 +0100
committerMario Kilies <MarioKilies@GMX.net>2011-01-31 19:02:08 +0100
commit16555337558b3d4bd2b656c2c895155e3063611e (patch)
treea8a1725b65c23f0da9c6b23c22fdcabf6163d96f /src/ui.c
parent0746aac341d75690ffb886d91bd3f41098220526 (diff)
First implementation of dgamelaunch mode.
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui.c b/src/ui.c
index 735621f..3537c1b 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -256,9 +256,9 @@ void ui_display_wnd_stack_points(const table_stacks_t *ts, const bool highlight,
* @param[in] num_players The number of players to show a player name and open card for
* @param[in] highlight If true, a player in the player table will be highlighted
* @param[in] highlighted_player The player to highlight
- * @param[in] score The players score
+ * @param[in] score The players score. Will be displayed if >= 0.
*/
-void ui_display_wnd_current_state(const player_list_t *pl, const uint8_t num_players, const bool highlight, const player_id_t highlighted_player, const uint32_t score)
+void ui_display_wnd_current_state(const player_list_t *pl, const uint8_t num_players, const bool highlight, const player_id_t highlighted_player, const int32_t score)
{
assert(pl != NULL);
uint8_t pos = 0;
@@ -266,7 +266,8 @@ void ui_display_wnd_current_state(const player_list_t *pl, const uint8_t num_pla
werase(w_current_state);
wattron(w_current_state, A_BOLD);
mvwprintw(w_current_state, 0, 0, "Current state:");
- mvwprintw(w_current_state, 0, 22, "Your Score: %3d", score);
+ if (score >= 0)
+ mvwprintw(w_current_state, 0, 22, "Your Score: %3d", score);
wattroff(w_current_state, A_BOLD);
mvwprintw(w_current_state, 1, 1, "Player Card");
mvwprintw(w_current_state, 1, 22, "Player Card");
@@ -435,10 +436,12 @@ void ui_display_wnd_final_scores(const player_list_t *pl, const uint8_t num_play
wrefresh(w_final_scores);
+#ifndef OXEN_DGLSERVER
int key;
do {
key = wgetch(w_final_scores);
} while (KEY_RETURN != key && KEY_ESCAPE != key);
+#endif // !OXEN_DGLSERVER
}
/**