MCPcopy Create free account
hub / github.com/NetHack/NetHack / player_sel_key_hit

Function player_sel_key_hit

outdated/win/gnome/gnplayer.c:14–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12static GtkWidget *clist;
13
14static void
15player_sel_key_hit(GtkWidget *widget, GdkEventKey *event, gpointer data)
16{
17 const char **roles = data;
18 int i;
19 for (i = 0; roles[i] != 0; ++i) {
20 if (tolower(roles[i][0]) == tolower(event->keyval)) {
21 role_number = i;
22 gtk_clist_select_row(GTK_CLIST(clist), i, 0);
23 if (gtk_clist_row_is_visible(GTK_CLIST(clist), i)
24 != GTK_VISIBILITY_FULL)
25 gtk_clist_moveto(GTK_CLIST(clist), i, 0, 0.5, 0);
26 }
27 }
28}
29
30static void
31player_sel_row_selected(GtkCList *clist, int row, int col, GdkEvent *event)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected