The part that confuses me the most at the moment:
say I select 'pegs' as the puzzle, then in the game menu, select 'Specific...' it pops up the built-in keyboard!
I don't know anything about gtk so this is all VERY confusing to me. Apparently the game 'solo' has a pencil-in mode and a regular add number mode. With a touch screen, I would be satisfied if touching a square popped up the keyboard, allowing input of a number. Not pretty, but functional at least. bafs way of including a keyboard (matchbox) is way beyond my abilites still. I can kind of read the code in kterm, but I can't just cut and paste it into here and make it work. I know it requires a lot more work than that - maybe a LONG time of learning about gtk.
In the meantime, there are a few other playable puzzles, which I shall try to include, but many require a right click or have many colors to play correctly and would not work well on a Kindle. If anyone else wants a go, I'd be happy to post a diff of where I'm at
A part of gtk.c
Code:
#ifdef STYLUS_BASED
menuitem=gtk_button_new_with_mnemonic("_Redo");
gtk_object_set_data(GTK_OBJECT(menuitem), "user-data",
GINT_TO_POINTER((int)('r')));
gtk_signal_connect(GTK_OBJECT(menuitem), "clicked",
GTK_SIGNAL_FUNC(menu_key_event), fe);
gtk_box_pack_end(hbox, menuitem, FALSE, FALSE, 0);
gtk_widget_show(menuitem);
menuitem=gtk_button_new_with_mnemonic("_Undo");
gtk_object_set_data(GTK_OBJECT(menuitem), "user-data",
GINT_TO_POINTER((int)('u')));
gtk_signal_connect(GTK_OBJECT(menuitem), "clicked",
GTK_SIGNAL_FUNC(menu_key_event), fe);
gtk_box_pack_end(hbox, menuitem, FALSE, FALSE, 0);
gtk_widget_show(menuitem);
if (thegame.flags & REQUIRE_NUMPAD) {
hbox = GTK_BOX(gtk_hbox_new(FALSE, 0));
gtk_box_pack_start(vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0);
gtk_widget_show(GTK_WIDGET(hbox));
*((int*)errbuf)=0;
errbuf[1]='\0';
for(errbuf[0]='0';errbuf[0]<='9';errbuf[0]++) {
menuitem=gtk_button_new_with_label(errbuf);
gtk_object_set_data(GTK_OBJECT(menuitem), "user-data",
GINT_TO_POINTER((int)(errbuf[0])));
gtk_signal_connect(GTK_OBJECT(menuitem), "clicked",
GTK_SIGNAL_FUNC(menu_key_event), fe);
gtk_box_pack_start(hbox, menuitem, TRUE, TRUE, 0);
gtk_widget_show(menuitem);
}
}
#endif /* STYLUS_BASED */
my goal is in the REQUIRE_NUMPAD section to show a toolbar. then I could possibly add number buttons as toolbar buttons. By adding it to just this section, it wouln't show on the wrong games. Maybe even a few other buttons for left-click and right-click for games like 'net'.
I have tried adding code (copy/paste from other websites) to this section but I can't seem to get a handle on which boxes are within which... Maybe I'll try to find a gtk forum and ask there.