Esempio n. 1
0
/******************************************************************************\
 Configure a specific player.
\******************************************************************************/
void I_configure_player(int index, const char *name, i_color_t color, bool host)
{
    C_assert(index >= 0 && index < PLAYERS);
    configure_player(index, name, color, host);
    I_widget_event(&players[index].box.widget, I_EV_CONFIGURE);

    /* Window may need repacking */
    I_widget_event(I_widget_top_level(&players[index].box.widget),
                   I_EV_CONFIGURE);
}
Esempio n. 2
0
/******************************************************************************\
 Update ping time and gold
\******************************************************************************/
void I_update_player(int player, int gold, short ping)
{
        char *buff;
        buff = C_va("% 5d", gold);
        C_strncpy_buf(players[player].gold.buffer, buff);
        buff = C_va("% 3d msec", ping);
        C_strncpy_buf(players[player].ping.buffer, buff);
        I_widget_event(&players[player].box.widget, I_EV_CONFIGURE);

        /* Window may need repacking */
        I_widget_event(I_widget_top_level(&players[player].box.widget),
                       I_EV_CONFIGURE);
}