QTfrontend/hwform.cpp
changeset 1907 a104432e8301
parent 1905 b1ec8db513f2
child 1924 8f8fe856ce9d
--- a/QTfrontend/hwform.cpp	Sun Mar 22 14:32:22 2009 +0000
+++ b/QTfrontend/hwform.cpp	Sun Mar 22 14:35:45 2009 +0000
@@ -38,6 +38,7 @@
 #include "hwform.h"
 #include "game.h"
 #include "team.h"
+#include "namegen.h"
 #include "teamselect.h"
 #include "selectWeapon.h"
 #include "gameuiconfig.h"
@@ -63,6 +64,8 @@
 	ui.pageOptions->CBResolution->addItems(sdli.getResolutions());
 
 	config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
+	
+	namegen = new HWNamegen();
 
 	UpdateTeamsLists();
 	UpdateWeapons();
@@ -426,14 +429,14 @@
 void HWForm::RandomNames()
 {
 	editedTeam->GetFromPage(this);
-	editedTeam->TeamRandomNames(FALSE);
+	namegen->TeamRandomNames(editedTeam,FALSE);
 	editedTeam->SetToPage(this);
 }
 
 void HWForm::RandomName(const int &i)
 {
 	editedTeam->GetFromPage(this);
-	editedTeam->TeamRandomName(i);
+	namegen->TeamRandomName(editedTeam,i);
 	editedTeam->SetToPage(this);
 }