Horacio J. Peņa <horape@compendium.com.ar>
This is free software (under the terms of the GNU LGPL)
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...
Use the gnome_scores_display.The other functions are going to be discontinued...(ok, i should add pixmap support to * _display before) |
void gnome_scores_display
(gchar *title, gchar *app_name, gchar *level, int pos);It calls gnome_score_get_notables to retrieve the info, creates the window, and show it.
Doesn't return nothing
pos = gnome_score_log (score, level, TRUE); gnome_scores_display (_ ("Mi game"), "migame", level, pos); |
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.
GtkWidget *gnome_scores_new
(guint n_scores, gchar **names, gfloat *scores, time_t *times, guint clear);Creates the high-scores window.
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?
void gnome_scores_set_logo_label
(GnomeScores *gs, gchar *txt, gchar *font, GdkColor *color);Creates a label to be the logo
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.
void gnome_scores_set_logo_pixmap
(GnomeScores *gs, gchar *logo);Creates a pixmap to be the logo
GnomeScores *gs
GNOME Scores widget.
gchar *logo
Name of the .xpm.
void gnome_scores_set_logo_widget
(GnomeScores *gs, GtkWidget *w);Set an arbitrary widget to be the logo.
GnomeScores *gs
GNOME Scores widget.
GtkWidget *w
Widget to be used as logo.
void gnome_scores_set_color
(GnomeScores *gs, guint pos, GdkColor *col);Set the color of one entry.
GnomeScores *gs
GNOME Scores widget.
guint pos
Entry to be changed.
GdkColor *col
Color.
void gnome_scores_set_def_color
(GnomeScores *gs, GdkColor *col);Set the default color of the entries.
GnomeScores *gs
GNOME Scores widget.
GdkColor *col
Color.
void gnome_scores_set_colors
(GnomeScores *gs, GdkColor *col);Set the color of all the entries.
GnomeScores *gs
Not Descripted.
GdkColor *col
Array of colors.
void gnome_scores_set_logo_label_title
(GnomeScores *gs, gchar *txt);Creates a label to be the logo
GnomeScores *gs
GNOME Scores widget.
gchar *txt
Name of the logo.
void gnome_scores_set_current_player
(GnomeScores *gs, gint i);Set the index of the current player in top ten.
GnomeScores *gs
GNOME Scores widget.
gint i
Index of the current(from 0 to 9).