Subversion Repositories spk

Rev

Rev 94 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 cycrow 1
#include "../StdAfx.h"
2
#include "CustomiseWeapons1.h"
3
 
4
namespace Creator {
5
	void CustomiseWeapons1::UpdateShields()
6
	{
7
		this->ComboShield->Items->Clear();
8
 
94 cycrow 9
		CGameDirectories *game = ((CustomiseShip ^)m_pParent)->gameDirectories();
197 cycrow 10
		for(Utils::WString shield = game->firstShield(); !shield.empty(); shield = game->nextShield()) {
94 cycrow 11
			this->ComboShield->Items->Add(_US(shield));
12
		}
13
 
14
		// add some defaults if we dont have any
15
		if ( !this->ComboShield->Items->Count ) {
1 cycrow 16
			for ( int i = 0; i < 6; i++ )
17
				this->ComboShield->Items->Add("SS_SHIELD_" + Convert::ToString(i));
18
		}
19
	}
20
 
21
	void CustomiseWeapons1::UpdateDisplay()
22
	{
23
		m_bUpdateing = true;
24
		if ( m_pShipData->iShieldType >= this->ComboShield->Items->Count )
25
			this->ComboShield->SelectedIndex = this->ComboShield->Items->Count - 1;
26
		else
27
			this->ComboShield->SelectedIndex = m_pShipData->iShieldType;
28
		this->NumShieldMax->Value = m_pShipData->iMaxShields;
29
		this->NumHull->Value = m_pShipData->iHull;
30
		this->NumReactor->Value = m_pShipData->iPower;
31
		this->NumWeaponEnergy->Value = m_pShipData->iLaserEnergy;
32
		this->TextRecharge->Text = Convert::ToString(Convert::ToDouble(m_pShipData->fLaserRecharge));
33
		this->NumReaction->Value = m_pShipData->iReactionDelay;
34
		this->NumMissiles->Value = m_pShipData->iMissileCount;
35
		m_bUpdateing = false;
36
	}
37
};