FS#1309 - extended player faces selection dialog

Attached to Project: OpenTTD
Opened by BigBB (BigBB) - Monday, 08 October 2007, 10:52 GMT
Type Patch
Category Interface
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Since I begin to play TT I hate it to create a face. And in OTTD it's still the same procedure. So I decided to create a patch to change it.

- you have the two gender buttons
- and a random button for new faces
- nothing else

Only the european males have 80,621,568 different faces and during you press the "New Face" butten there are random afrikan faces between the european ones. So good luck to get "your" face.

With this patch:
- you have two gender buttons, too
- you have two ethnicity buttons
- a random button, but now you can define your ethnicity and don't have a random one
- 2 checkboxes to enable/disable glasses and for male moustache or for females earring
- and then 10 switching buttons to change all sorts of face-variables

So it's easy and fast to create your face. And as bonus you have:

- a save button
- a load button
- and the possibility to enter the face nummber direct

The face number will be saved in the openttd.cfg and has a value between 0 and 0xFFFFFFFF but not all values have a face. So it's advisable not to edit it if you don't know what you do (if you enter a invalid value it will be make valid).
With the face no. button can you see your current face no. and/or enter a new one without need to editing openttd.cfg.

If you don't like this patch? No problem. By default is the normal (old one) face selection window showing. Only if you press the expand or 'advanced' button you have the new possibilities.

The look is inspiratedional by a patch from jez and the suggestions in the thread.

Internally is the code completely dynamic. So if there comes some new (e.g.) chins you don't need to edit the code for the window.

After v1.5 skidd13 spend much time to find bugs and to make me many suggestions how the code looks much better (coding and documentation style). He help me a lot, thank you very much!

link for patch-file:
current version: 1.7.1

Have fun,
This task depends upon

Closed by  Remko Bijker (Rubidium)
Monday, 15 October 2007, 19:59 GMT
Reason for closing:  Implemented
Additional comments about closing:  In r11269.
Comment by BigBB (BigBB) - Tuesday, 09 October 2007, 13:46 GMT
Little update to reduce CPU load in some functions also removed some unneeded code.