Subversion Repositories spk

Rev

Rev 191 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 191 Rev 197
Line 8... Line 8...
8
 
8
 
9
		this->ComboGameLaser->Items->Clear();
9
		this->ComboGameLaser->Items->Clear();
10
		this->ComboGameLaser->Items->Add("- Default -");
10
		this->ComboGameLaser->Items->Add("- Default -");
11
	}
11
	}
12
 
12
 
13
	void _addToList(CyStringList *list, std::pair<Utils::String, Utils::String> &pair, int idPos)
13
	void _addToList(CyStringList *list, std::pair<Utils::WString, Utils::WString> &pair, int idPos)
14
	{
14
	{
15
		Utils::String group = pair.first.token(";", idPos);
15
		Utils::WString group = pair.first.token(L";", idPos);
16
		SStringList *found = list->FindString(group);
16
		SStringList *found = list->FindString(group.toString());
17
		if ( found ) {
17
		if ( found ) {
18
			found->data += ", ";
18
			found->data += ", ";
19
			found->data += pair.second;
19
			found->data += pair.second.toString();
20
		}
20
		}
21
		else
21
		else
22
			list->PushBack(CyString(group), CyString(pair.second));
22
			list->PushBack(CyString(group.toString()), CyString(pair.second.toString()));
23
	}
23
	}
24
 
24
 
25
	void CustomiseWeapons::UpdateWeaponsList()
25
	void CustomiseWeapons::UpdateWeaponsList()
26
	{
26
	{
27
		m_bUpdating = true;
27
		m_bUpdating = true;
Line 79... Line 79...
79
			if ( gameDir->selectedVFS() ) 
79
			if ( gameDir->selectedVFS() ) 
80
				((CustomiseShip ^)m_pParent)->LoadText(gameDir->selectedVFS());
80
				((CustomiseShip ^)m_pParent)->LoadText(gameDir->selectedVFS());
81
		}
81
		}
82
 
82
 
83
		if ( !this->RadioMissiles->Checked ) {
83
		if ( !this->RadioMissiles->Checked ) {
84
			for ( std::pair<Utils::String, Utils::String> laser = gameDir->firstLaser(); !laser.first.empty(); laser = gameDir->nextLaser() ) {
84
			for ( std::pair<Utils::WString, Utils::WString> laser = gameDir->firstLaser(); !laser.first.empty(); laser = gameDir->nextLaser() ) {
85
				_addToList(&List, laser, 6);
85
				_addToList(&List, laser, 6);
86
			}
86
			}
87
		}
87
		}
88
		else {
88
		else {
89
			for ( std::pair<Utils::String, Utils::String> missile = gameDir->firstMissile(); !missile.first.empty(); missile = gameDir->nextMissile() ) {
89
			for ( std::pair<Utils::WString, Utils::WString> missile = gameDir->firstMissile(); !missile.first.empty(); missile = gameDir->nextMissile() ) {
90
				_addToList(&List, missile, 6);
90
				_addToList(&List, missile, 6);
91
			}
91
			}
92
		}
92
		}
93
		if ( this->ComboGameLaser->SelectedIndex > 0 )
93
		if ( this->ComboGameLaser->SelectedIndex > 0 )
94
			gameDir->reselectTemporaryDirectory();
94
			gameDir->reselectTemporaryDirectory();