I think it'd be a lot nicer to replace the contents of the country selection list (currently country_england.xml, country_germany.xml and so on) with proper country names. The <name> tag from the country def. file would be ideal. This is kind of an obvious suggestion, so I understand if it's being left this way on purpose while development is still ongoing.
Also, is it possible to replace the simple choice of "top league / current league / bottom league" with a drop-down list containing all the leagues of the country? I imagine it working like this. Every time you select a new team, the league choice is set to that team's current league. You can then change the league before adding the user.
This way, the user could choose to start in a low but not rock-bottom position (e.g. league 4 in England), with any team of their choice.
Mark
Better country/team selection screen
Re: Better country/team selection screen
the problem with this idea is that we'd have to load all country files we find in the support directories (just so that we can access the country name). that would make the startup slower, would require more memory and we'd have to free all the unneeded countries after the user chose a country and team (we have 9 countries already and this number won't decrease, only increase).MarkC wrote:I think it'd be a lot nicer to replace the contents of the country selection list (currently country_england.xml, country_germany.xml and so on) with proper country names. The <name> tag from the country def. file would be ideal. This is kind of an obvious suggestion, so I understand if it's being left this way on purpose while development is still ongoing.
One thing we could do is to remove 'country_' and '.xml' and capitalise the rest (country_france.xml -> France). this'd be a bit nicer, but i'm not sure it's worth it (we'd have to do the reverse procedure as well to know which file the country the user selected corresponds to).
yep, this is a nice idea. maybe i'll add it before the release (not before saturday, though).Also, is it possible to replace the simple choice of "top league / current league / bottom league" with a drop-down list containing all the leagues of the country? I imagine it working like this. Every time you select a new team, the league choice is set to that team's current league. You can then change the league before adding the user.
gyözö
Press any key to continue or any other key to quit.
Re: Better country/team selection screen
Yes, I see the point. Would we need to load the whole country, though? Couldn't we use a simpler xml parser that "cheats" and only reads each country file as far as the name tag? I don't imagine that this would be too much of a performance problem, even for a large number of countries.the problem with this idea is that we'd have to load all country files we find in the support directories (just so that we can access the country name). that would make the startup slower, would require more memory and we'd have to free all the unneeded countries after the user chose a country and team (we have 9 countries already and this number won't decrease, only increase).
Hmm, why reverse the procedure? I imagined making two arrays, one with the filenames and another with the country names in the same order. Then we just look up the filename corresponding to the chosen country.One thing we could do is to remove 'country_' and '.xml' and capitalise the rest (country_france.xml -> France). this'd be a bit nicer, but i'm not sure it's worth it (we'd have to do the reverse procedure as well to know which file the country the user selected corresponds to).
I was just thinking that some countries with long names (perhaps two words or more) will have clunky filenames and/or look ugly in the selection list.
Greatyep, this is a nice idea. maybe i'll add it before the release (not before saturday, though).
yeah I hate to say this again, but even tho you guys are way ahead of my programming prowess and I bow to your better judgments,I had a quick look at XML when Gyboth first mentioned it and with "Python" even I was conducting XML symphonies. I have even had an odd look at using python to read the current string of bygfoot xml files with the intention of making a front end for them but then one has to ask why? (like getting history data out) but i have little time to chase such pursuits .Couldn't we use a simpler xml parser that "cheats"
"There are two ways to score. Dribble it over the line or smash it into the back of the net."
What type are you?
What type are you?
Ah, I didn't mean to suggest an entirely new parser for everything. I just meant another set of functions written in C like we already have, but simply for getting names out rather than constructing the whole country definition.vector wrote:yeah I hate to say this again, but even tho you guys are way ahead of my programming prowess and I bow to your better judgments,I had a quick look at XML when Gyboth first mentioned it and with "Python" even I was conducting XML symphonies.Couldn't we use a simpler xml parser that "cheats"
You're quite right though, C is far from the best language for processing text of any kind Languages like Python are just made for it, and I believe it's quite easy to call Python modules from C code. But it would make bygfoot dependent on having the Python interpreter available, and for a small project like this it's probably not worth the effort to start linking languages together.
Re: Better country/team selection screen
of course this is a possibility, but i'd say just to make the startup screen look a bit better it's a bit too circumstantial. in C, at least.MarkC wrote:Yes, I see the point. Would we need to load the whole country, though? Couldn't we use a simpler xml parser that "cheats" and only reads each country file as far as the name tag? I don't imagine that this would be too much of a performance problem, even for a large number of countries.
to get the file name from the country name (France -> country_france.xml).Hmm, why reverse the procedure?
that would involve putting the arrays into the combo box, and in such a way that the user doesn't see the filename parts. again, it's not really worth it, i'd say. there are other parts of the program that need improvement a lot more.I imagined making two arrays, one with the filenames and another with the country names in the same order. Then we just look up the filename corresponding to the chosen country.
yes. i'd say let's stick with the xml filenames (and avoid clunky filenames for countries to come). that's clear for the user, too (e.g. if he makes a new def and copies it into the support dir, the file name appears next time he starts the game) and with the flags it doesn't look that bad either.I was just thinking that some countries with long names (perhaps two words or more) will have clunky filenames and/or look ugly in the selection list.
gyözö
Press any key to continue or any other key to quit.
Re: Better country/team selection screen
this is added now.MarkC wrote:Also, is it possible to replace the simple choice of "top league / current league / bottom league" with a drop-down list containing all the leagues of the country?
gyözö
Press any key to continue or any other key to quit.
Re: Better country/team selection screen
Ah, ok. I'm not familiar with GTK. I thought you'd just be able to put the country names into the combo box and the filenames into a separate array. Then if you user picks row 3 from the combo box, you look up row 3 in the filename array.that would involve putting the arrays into the combo box, and in such a way that the user doesn't see the filename parts.I imagined making two arrays, one with the filenames and another with the country names in the same order. Then we just look up the filename corresponding to the chosen country.
Agreed!again, it's not really worth it, i'd say. there are other parts of the program that need improvement a lot more.
Excellent, that looks really goodthis is added now.Also, is it possible to replace the simple choice of "top league / current league / bottom league" with a drop-down list containing all the leagues of the country?
Re: Better country/team selection screen
oh, separate arrays. i didn't think of that that would work of course. but it'd lead to some new global variables which won't be needed later at all.MarkC wrote:Ah, ok. I'm not familiar with GTK. I thought you'd just be able to put the country names into the combo box and the filenames into a separate array. Then if you user picks row 3 from the combo box, you look up row 3 in the filename array.
gyözö
Press any key to continue or any other key to quit.