| 228 | } |
| 229 | |
| 230 | void CharCreationPane::randomizeName() { |
| 231 | auto species = Root::singleton().speciesDatabase()->species(m_speciesList[m_speciesChoice]); |
| 232 | auto tb = fetchChild<TextBoxWidget>("name"); |
| 233 | auto genderOption = species->options().genderOptions.wrap(m_genderChoice); |
| 234 | int limiter = 100; |
| 235 | while (!tb->setText(Root::singleton().nameGenerator()->generateName(species->nameGen(genderOption.gender)))) { |
| 236 | if (limiter == 0) |
| 237 | break; |
| 238 | limiter--; |
| 239 | } |
| 240 | changed(); |
| 241 | } |
| 242 | |
| 243 | void CharCreationPane::changed() { |
| 244 | auto& root = Root::singleton(); |
nothing calls this directly
no test coverage detected