Line 14... |
Line 14... |
14 |
/// Summary for CustomiseTurret
|
14 |
/// Summary for CustomiseTurret
|
15 |
/// </summary>
|
15 |
/// </summary>
|
16 |
public ref class CustomiseTurret : public System::Windows::Forms::UserControl
|
16 |
public ref class CustomiseTurret : public System::Windows::Forms::UserControl
|
17 |
{
|
17 |
{
|
18 |
public:
|
18 |
public:
|
19 |
CustomiseTurret(Windows::Forms::Form ^parent, ImageList ^imagesSmall, ImageList ^imagesLarge, const Utils::CStringList *pModels, CShipData *shipData, CXspFile *shipFile)
|
19 |
CustomiseTurret(Windows::Forms::Form ^parent, ImageList ^imagesSmall, ImageList ^imagesLarge, const Utils::WStringList *pModels, CShipData *shipData, CXspFile *shipFile)
|
20 |
{
|
20 |
{
|
21 |
InitializeComponent();
|
21 |
InitializeComponent();
|
22 |
|
22 |
|
23 |
this->ListTurret->SmallImageList = imagesSmall;
|
23 |
this->ListTurret->SmallImageList = imagesSmall;
|
24 |
this->ListTurret->LargeImageList = imagesLarge;
|
24 |
this->ListTurret->LargeImageList = imagesLarge;
|
Line 50... |
Line 50... |
50 |
void SaveCockpitWeaponsList();
|
50 |
void SaveCockpitWeaponsList();
|
51 |
|
51 |
|
52 |
protected:
|
52 |
protected:
|
53 |
ListViewItem ^m_pSelectedItem;
|
53 |
ListViewItem ^m_pSelectedItem;
|
54 |
bool m_bUpdateing;
|
54 |
bool m_bUpdateing;
|
55 |
const Utils::CStringList *_pModels;
|
55 |
const Utils::WStringList *_pModels;
|
56 |
CXspFile *m_pShipFile;
|
56 |
CXspFile *m_pShipFile;
|
57 |
CShipData *m_pShipData;
|
57 |
CShipData *m_pShipData;
|
58 |
Windows::Forms::Form ^m_pParent;
|
58 |
Windows::Forms::Form ^m_pParent;
|
59 |
SCockpit *m_pCurrentCockpit;
|
59 |
SCockpit *m_pCurrentCockpit;
|
60 |
|
60 |
|
Line 670... |
Line 670... |
670 |
#pragma endregion
|
670 |
#pragma endregion
|
671 |
private: System::Void ComboCockpit_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
|
671 |
private: System::Void ComboCockpit_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
|
672 |
if (_pModels && !_pModels->empty())
|
672 |
if (_pModels && !_pModels->empty())
|
673 |
{
|
673 |
{
|
674 |
m_pShipData->lTurrets.Get(0)->iSceneNode = this->ComboCockpit->SelectedIndex;
|
674 |
m_pShipData->lTurrets.Get(0)->iSceneNode = this->ComboCockpit->SelectedIndex;
|
675 |
m_pShipData->lTurrets.Get(0)->sModel = _pModels->get(this->ComboCockpit->SelectedIndex)->str.toWString();
|
675 |
m_pShipData->lTurrets.Get(0)->sModel = _pModels->get(this->ComboCockpit->SelectedIndex)->str;
|
676 |
}
|
676 |
}
|
677 |
}
|
677 |
}
|
678 |
private: System::Void ListTurret_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
|
678 |
private: System::Void ListTurret_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
|
679 |
this->UpdateCockpitDisplay();
|
679 |
this->UpdateCockpitDisplay();
|
680 |
}
|
680 |
}
|
Line 740... |
Line 740... |
740 |
}
|
740 |
}
|
741 |
private: System::Void ButNewCockpit_Click(System::Object^ sender, System::EventArgs^ e) {
|
741 |
private: System::Void ButNewCockpit_Click(System::Object^ sender, System::EventArgs^ e) {
|
742 |
InputBox ^input = gcnew InputBox("Enter the cockpit id to add", "SS_COCKPIT_");
|
742 |
InputBox ^input = gcnew InputBox("Enter the cockpit id to add", "SS_COCKPIT_");
|
743 |
if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
|
743 |
if ( input->ShowDialog(this) == Windows::Forms::DialogResult::OK )
|
744 |
{
|
744 |
{
|
745 |
m_pShipFile->NewCockpit(_S(input->GetInput()), "4512", 0);
|
745 |
m_pShipFile->newCockpit(_WS(input->GetInput()), "4512", 0);
|
746 |
this->ComboCockpitCustom->Items->Add(input->GetInput());
|
746 |
this->ComboCockpitCustom->Items->Add(input->GetInput());
|
747 |
this->ComboCockpitCustom->Text = input->GetInput();
|
747 |
this->ComboCockpitCustom->Text = input->GetInput();
|
748 |
this->RadioCockpitCustom->Checked = true;
|
748 |
this->RadioCockpitCustom->Checked = true;
|
749 |
this->RadioCockpitCustom->Enabled = true;
|
749 |
this->RadioCockpitCustom->Enabled = true;
|
750 |
}
|
750 |
}
|