Subversion Repositories spk

Rev

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

Rev 94 Rev 197
Line 4... Line 4...
4
namespace Creator {
4
namespace Creator {
5
 
5
 
6
	void SelectFilesystem::update()
6
	void SelectFilesystem::update()
7
	{
7
	{
8
		for ( int i = 1; i <= _pGameDir->highestGame(); i++ ) {
8
		for ( int i = 1; i <= _pGameDir->highestGame(); i++ ) {
9
			for(Utils::String dir = _pGameDir->first(); !dir.empty(); dir = _pGameDir->next()) {
9
			for(Utils::WString dir = _pGameDir->first(); !dir.empty(); dir = _pGameDir->next()) {
10
				if ( _pGameDir->currentGame() == i ) {
10
				if ( _pGameDir->currentGame() == i ) {
11
					this->comboBox1->Items->Add(_US(_pGameDir->currentName()));
11
					this->comboBox1->Items->Add(_US(_pGameDir->currentName()));
12
					break;
12
					break;
13
				}
13
				}
14
			}
14
			}
Line 21... Line 21...
21
	{
21
	{
22
		this->comboBox2->Items->Clear();
22
		this->comboBox2->Items->Clear();
23
 
23
 
24
		// find the game to match the currently selected one
24
		// find the game to match the currently selected one
25
		int iCurrentGame = this->comboBox1->SelectedIndex + 1;
25
		int iCurrentGame = this->comboBox1->SelectedIndex + 1;
26
		Utils::String gameName = _S(this->comboBox1->SelectedItem->ToString());
26
		Utils::WString gameName = _WS(this->comboBox1->SelectedItem->ToString());
27
		for ( Utils::String dir = _pGameDir->first(); !dir.empty(); dir = _pGameDir->next() ) {
27
		for ( Utils::WString dir = _pGameDir->first(); !dir.empty(); dir = _pGameDir->next() ) {
28
			if ( gameName.Compare(_pGameDir->currentName()) ) {
28
			if ( gameName.Compare(_pGameDir->currentName()) ) {
29
				iCurrentGame = _pGameDir->currentGame();
29
				iCurrentGame = _pGameDir->currentGame();
30
				break;
30
				break;
31
			}
31
			}
32
		}
32
		}
33
 
33
 
34
		for (Utils::String dir = _pGameDir->first(iCurrentGame); !dir.empty(); dir = _pGameDir->next(iCurrentGame) ) {
34
		for (Utils::WString dir = _pGameDir->first(iCurrentGame); !dir.empty(); dir = _pGameDir->next(iCurrentGame) ) {
35
			this->comboBox2->Items->Add(_US(dir));
35
			this->comboBox2->Items->Add(_US(dir));
36
		}
36
		}
37
 
37
 
38
		this->comboBox2->SelectedIndex = (!this->comboBox2->Items->Count) ? -1 : 0;
38
		this->comboBox2->SelectedIndex = (!this->comboBox2->Items->Count) ? -1 : 0;
39
	}
39
	}
Line 54... Line 54...
54
		}
54
		}
55
 
55
 
56
		this->comboBox3->SelectedIndex = 0;
56
		this->comboBox3->SelectedIndex = 0;
57
	}
57
	}
58
 
58
 
59
	Utils::String SelectFilesystem::gameDir()
59
	Utils::WString SelectFilesystem::gameDir()
60
	{
60
	{
61
		for ( Utils::String dir = _pGameDir->first(); !dir.empty(); dir = _pGameDir->next() ) {
61
		for ( Utils::WString dir = _pGameDir->first(); !dir.empty(); dir = _pGameDir->next() ) {
62
			if ( dir.Compare(_S(this->comboBox2->Items[this->comboBox2->SelectedIndex]->ToString())) ) {
62
			if ( dir.Compare(_S(this->comboBox2->Items[this->comboBox2->SelectedIndex]->ToString())) ) {
63
				_pGameDir->setSelectedDirectory(dir);
63
				_pGameDir->setSelectedDirectory(dir);
64
				return dir;
64
				return dir;
65
			}
65
			}
66
		}
66
		}