[04:16:58] --- DominusExult is now known as Dominus
[12:18:23] <Dominus> https://www.dropbox.com/s/chwoj6e8jxt6jbz/Prompt.png?dl=0
[12:20:03] <Dominus> wjp, Marzo I need help with the iOS port :( For prompting a savegame name we run the iOS input prompt as seen on https://www.dropbox.com/s/chwoj6e8jxt6jbz/Prompt.png?dl=0
[12:20:11] <Dominus> trigger is at https://github.com/litchie/exult-ios/blob/master/gumps/Newfile_gump.cc#L802
[12:20:37] <Dominus> problem is that this will prompt right away when you click on an existing savegame
[12:21:13] <Dominus> it would be better to only prompt to change a savegame name when you hit the same field again
[12:22:03] <Dominus> so if (selected >= 0 and then some other condition but I can't get it to work in any simple way...
[12:25:48] <Marzo> How about: if you select new game (selected == -2), make the prompt appear; if you select an existing game (selected >= 0), require another tap on the same spot
[12:26:48] <Marzo> This would require tracking the last selected spot (line 718) and comparing to see if you did not click on a different spot
[12:36:03] <Dominus> Marzo, thanks. I see what you mean, it's just that I can't wrap my head around to see how and where to compare it
[12:36:27] <Marzo> It would be in line 803
[12:36:58] <Marzo> Lets say you add a variable 'last_selected'
[12:37:38] <Marzo> Before line 718, and before any other line that sets selected, you add "last_selected = selected;"
[12:38:09] <Marzo> In what is now line 803, you change the condition from
[12:38:14] <Marzo> if (selected == -2 || selected >= 0) {
[12:38:17] <Marzo> to (say)
[12:38:36] <Marzo> if (selected == -2 || (selected >= 0 && selected == last_selected)) {
[12:45:51] <Dominus> hmm, doesn't prompt
[12:46:27] <Dominus> I added int last_selected; to newfile_gump.h and everything else you wrote
[13:01:47] <Dominus> hmm, Marzo, I've added some cout and it seems it only registers a new value for last_selected when you actually change slots
[13:01:50] <Dominus> so if I tap on line 0 and then line 1 it will show value 0 for last_selected each time I press on line 1
[13:19:08] <Dominus> right, because of if (hit + list_position >= num_games || hit + list_position < -2 || selected == hit + list_position) return true;
[13:19:24] <Dominus> selected == hit + list_position prevents that from updating
[13:23:10] <Dominus> so moving it up to line 712 seems to make it work
[13:23:30] <Dominus> thanks Marzo!
[13:28:32] <Dominus> that has bothered me for a while....