gnome-scores - "High Scores" Widget

Author(s)

Horacio J. Peņa <horape@compendium.com.ar>

This is free software (under the terms of the GNU LGPL)

Description

A specialized widget to display "High Scores" for games. It's very integrated with the gnome-score stuff so you only need to call one function to do all the work...

Usage

Use the gnome_scores_display.The other functions are going to be
  discontinued...(ok, i should add pixmap support to * _display
		  before)

gnome_scores_display - Does all the work of displaying the best scores.

void gnome_scores_display(gchar *title, gchar *app_name, gchar *level, int pos);

Description

It calls gnome_score_get_notables to retrieve the info, creates the window, and show it.

Returns

Doesn't return nothing

Usage

pos = gnome_score_log (score, level, TRUE);
gnome_scores_display (_ ("Mi game"), "migame", level, pos);

Parameters

  • gchar *title

    Title.

  • gchar *app_name

    Name of the application, as in gnome_score_init.

  • gchar *level

    Level of the game or NULL.

  • int pos

    Position in the top ten of the current player, as returned by gnome_score_log.

gnome_scores_new - Creates the high-scores window.

GtkWidget *gnome_scores_new(guint n_scores, gchar **names, gfloat *scores, time_t *times, guint clear);

Description

Creates the high-scores window.

Parameters

  • guint n_scores

    Number of positions.

  • gchar **names

    Names of the players.

  • gfloat *scores

    Scores

  • time_t *times

    Time in which the scores were done

  • guint clear

    Add a "Clear" Button?

gnome_scores_set_logo_label - Creates a label to be the logo

void gnome_scores_set_logo_label(GnomeScores *gs, gchar *txt, gchar *font, GdkColor *color);

Description

Creates a label to be the logo

Parameters

  • GnomeScores *gs

    GNOME Scores widget.

  • gchar *txt

    Text in the label.

  • gchar *font

    Font to use in the label.

  • GdkColor *color

    Color to use in the label.

gnome_scores_set_logo_pixmap - Creates a pixmap to be the logo

void gnome_scores_set_logo_pixmap(GnomeScores *gs, gchar *logo);

Description

Creates a pixmap to be the logo

Parameters

  • GnomeScores *gs

    GNOME Scores widget.

  • gchar *logo

    Name of the .xpm.

gnome_scores_set_logo_widget - Set an arbitrary widget to be the logo.

void gnome_scores_set_logo_widget(GnomeScores *gs, GtkWidget *w);

Description

Set an arbitrary widget to be the logo.

Parameters

  • GnomeScores *gs

    GNOME Scores widget.

  • GtkWidget *w

    Widget to be used as logo.

gnome_scores_set_color - Set the color of one entry.

void gnome_scores_set_color(GnomeScores *gs, guint pos, GdkColor *col);

Description

Set the color of one entry.

Parameters

  • GnomeScores *gs

    GNOME Scores widget.

  • guint pos

    Entry to be changed.

  • GdkColor *col

    Color.

gnome_scores_set_def_color - Set the default color of the entries.

void gnome_scores_set_def_color(GnomeScores *gs, GdkColor *col);

Description

Set the default color of the entries.

Parameters

  • GnomeScores *gs

    GNOME Scores widget.

  • GdkColor *col

    Color.

gnome_scores_set_colors - Set the color of all the entries.

void gnome_scores_set_colors(GnomeScores *gs, GdkColor *col);

Description

Set the color of all the entries.

Parameters

  • GnomeScores *gs

    Not Descripted.

  • GdkColor *col

    Array of colors.

gnome_scores_set_logo_label_title - Creates a label to be the logo

void gnome_scores_set_logo_label_title(GnomeScores *gs, gchar *txt);

Description

Creates a label to be the logo

Parameters

  • GnomeScores *gs

    GNOME Scores widget.

  • gchar *txt

    Name of the logo.

gnome_scores_set_current_player - Set the index of the current player in top ten.

void gnome_scores_set_current_player(GnomeScores *gs, gint i);

Description

Set the index of the current player in top ten.

Parameters

  • GnomeScores *gs

    GNOME Scores widget.

  • gint i

    Index of the current(from 0 to 9).