Rev 94 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#include "../StdAfx.h"
#include "CustomiseWeapons1.h"
namespace Creator {
void CustomiseWeapons1::UpdateShields()
{
this->ComboShield->Items->Clear();
CGameDirectories *game = ((CustomiseShip ^)m_pParent)->gameDirectories();
for(Utils::WString shield = game->firstShield(); !shield.empty(); shield = game->nextShield()) {
this->ComboShield->Items->Add(_US(shield));
}
// add some defaults if we dont have any
if ( !this->ComboShield->Items->Count ) {
for ( int i = 0; i < 6; i++ )
this->ComboShield->Items->Add("SS_SHIELD_" + Convert::ToString(i));
}
}
void CustomiseWeapons1::UpdateDisplay()
{
m_bUpdateing = true;
if ( m_pShipData->iShieldType >= this->ComboShield->Items->Count )
this->ComboShield->SelectedIndex = this->ComboShield->Items->Count - 1;
else
this->ComboShield->SelectedIndex = m_pShipData->iShieldType;
this->NumShieldMax->Value = m_pShipData->iMaxShields;
this->NumHull->Value = m_pShipData->iHull;
this->NumReactor->Value = m_pShipData->iPower;
this->NumWeaponEnergy->Value = m_pShipData->iLaserEnergy;
this->TextRecharge->Text = Convert::ToString(Convert::ToDouble(m_pShipData->fLaserRecharge));
this->NumReaction->Value = m_pShipData->iReactionDelay;
this->NumMissiles->Value = m_pShipData->iMissileCount;
m_bUpdateing = false;
}
};