Subversion Repositories spk

Rev

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

Rev 68 Rev 94
Line 3... Line 3...
3
 
3
 
4
namespace Creator {
4
namespace Creator {
5
 
5
 
6
	void SelectFilesystem::update()
6
	void SelectFilesystem::update()
7
	{
7
	{
8
		for ( int i = 1; i <= m_iHighestGame; i++ ) {
8
		for ( int i = 1; i <= _pGameDir->highestGame(); i++ ) {
9
			for ( SGameDir *gd = m_pGameDir->First(); gd; gd = m_pGameDir->Next() ) {
9
			for(Utils::String dir = _pGameDir->first(); !dir.empty(); dir = _pGameDir->next()) {
10
				if ( i == gd->iGame ) {
10
				if ( _pGameDir->currentGame() == i ) {
11
					this->comboBox1->Items->Add(_US(gd->name));
11
					this->comboBox1->Items->Add(_US(_pGameDir->currentName()));
12
					break;
12
					break;
13
				}
13
				}
14
			}
14
			}
15
		}
15
		}
16
 
16
 
Line 22... Line 22...
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::String gameName = _S(this->comboBox1->SelectedItem->ToString());
27
		for ( SGameDir *gd = m_pGameDir->First(); gd; gd = m_pGameDir->Next() ) {
27
		for ( Utils::String dir = _pGameDir->first(); !dir.empty(); dir = _pGameDir->next() ) {
28
			if ( gameName.Compare(gd->name) ) {
28
			if ( gameName.Compare(_pGameDir->currentName()) ) {
29
				iCurrentGame = gd->iGame;
29
				iCurrentGame = _pGameDir->currentGame();
30
				break;
30
				break;
31
			}
31
			}
32
		}
32
		}
33
 
33
 
34
		for ( SGameDir *gd = m_pGameDir->First(); gd; gd = m_pGameDir->Next() ) {
34
		for (Utils::String dir = _pGameDir->first(iCurrentGame); !dir.empty(); dir = _pGameDir->next(iCurrentGame) ) {
35
			if ( gd->iGame == iCurrentGame ) {
-
 
36
				this->comboBox2->Items->Add(_US(gd->dir));
35
			this->comboBox2->Items->Add(_US(dir));
37
			}
-
 
38
		}
36
		}
39
 
37
 
40
		this->comboBox2->SelectedIndex = (!this->comboBox2->Items->Count) ? -1 : 0;
38
		this->comboBox2->SelectedIndex = (!this->comboBox2->Items->Count) ? -1 : 0;
41
	}
39
	}
42
 
40
 
Line 56... Line 54...
56
		}
54
		}
57
 
55
 
58
		this->comboBox3->SelectedIndex = 0;
56
		this->comboBox3->SelectedIndex = 0;
59
	}
57
	}
60
 
58
 
61
	SGameDir *SelectFilesystem::gameDir()
59
	Utils::String SelectFilesystem::gameDir()
62
	{
60
	{
63
		for ( SGameDir *gd = m_pGameDir->First(); gd; gd = m_pGameDir->Next() ) {
61
		for ( Utils::String dir = _pGameDir->first(); !dir.empty(); dir = _pGameDir->next() ) {
64
			if ( gd->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);
65
				return gd;
64
				return dir;
66
			}
65
			}
67
		}
66
		}
68
 
67
 
69
		return NULL;
68
		return Utils::String::Null();
70
	}
69
	}
71
 
70
 
72
	String ^SelectFilesystem::gameMod()
71
	String ^SelectFilesystem::gameMod()
73
	{
72
	{
74
		if ( this->comboBox3->SelectedIndex == 0 ) return nullptr;
73
		if ( this->comboBox3->SelectedIndex == 0 ) return nullptr;