2016-10-29 8 views
0

私の友人と私はウィンドウで動く簡単なゲームを作っています。私はすでにそれを始めました。私はVisual Studio Community 2015を使っていますが、私の友人はMacを持っているので、私が使っているのと同じIDEを使うことはできません。私はWindowsフォームを使用していますが、そのコードは通常のC++コードですが、友人がリポジトリを複製しようとすると、サポートされていないファイルと表示されます。誰がこれが誰かを知っていますか?または、このコードを実行できるMac用の任意のIDEですか?Visual Studio 2015でサポートされていないファイルですか?

#pragma once 

namespace TextRPG { 

using namespace System; 
using namespace System::ComponentModel; 
using namespace System::Collections; 
using namespace System::Windows::Forms; 
using namespace System::Data; 
using namespace System::Drawing; 

/// <summary> 
/// Summary for UserInterface 
/// </summary> 
public ref class UserInterface : public System::Windows::Forms::Form 
{ 
public: 
    UserInterface(void) 
    { 
     InitializeComponent(); 
     // 
     //TODO: Add the constructor code here 
     // 
    } 

protected: 
    /// <summary> 
    /// Clean up any resources being used. 
    /// </summary> 
    ~UserInterface() 
    { 
     if (components) 
     { 
      delete components; 
     } 
    } 
public: System::Windows::Forms::PictureBox^ pictureBox1; 
protected: 
public: System::Windows::Forms::PictureBox^ pictureBox2; 
public: System::Windows::Forms::Button^ option1; 
public: System::Windows::Forms::Button^ option2; 
public: System::Windows::Forms::Button^ option3; 
public: System::Windows::Forms::Button^ option4; 
public: System::Windows::Forms::Button^ startGame; 
public: System::Windows::Forms::Button^ saveGame; 

public: 
    /// <summary> 
    /// Required designer variable. 
    /// </summary> 
    System::ComponentModel::Container ^components; 

#pragma region Windows Form Designer generated code 
    /// <summary> 
    /// Required method for Designer support - do not modify 
    /// the contents of this method with the code editor. 
    /// </summary> 
    void InitializeComponent(void) 
    { 
     this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox()); 
     this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox()); 
     this->option1 = (gcnew System::Windows::Forms::Button()); 
     this->option2 = (gcnew System::Windows::Forms::Button()); 
     this->option3 = (gcnew System::Windows::Forms::Button()); 
     this->option4 = (gcnew System::Windows::Forms::Button()); 
     this->startGame = (gcnew System::Windows::Forms::Button()); 
     this->saveGame = (gcnew System::Windows::Forms::Button()); 
     (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->pictureBox1))->BeginInit(); 
     (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->pictureBox2))->BeginInit(); 
     // 
     // pictureBox2 
     // 
     this->pictureBox2->ImageLocation = L"C:\\Users\\sylva\\Source\\Repos\\Text-RPG\\Mohammed_Background Scenery.PNG"; 
     this->pictureBox2->Location = System::Drawing::Point(0, 0); 
     this->pictureBox2->Name = L"pictureBox2"; 
     this->pictureBox2->Size = System::Drawing::Size(870, 627); 
     this->pictureBox2->SizeMode = System::Windows::Forms::PictureBoxSizeMode::AutoSize; 
     this->pictureBox2->TabIndex = 1; 
     this->pictureBox2->TabStop = false; 
     this->pictureBox2->Click += gcnew System::EventHandler(this, &UserInterface::pictureBox2_Click); 
     // 
     // option1 
     // 
     this->option1->Location = System::Drawing::Point(61, 418); 
     this->option1->Name = L"option1"; 
     this->option1->Size = System::Drawing::Size(256, 62); 
     this->option1->TabIndex = 2; 
     this->option1->Text = L"option1"; 
     this->option1->UseVisualStyleBackColor = true; 
     this->option1->Visible = false; 
     // 
     // option2 
     // 
     this->option2->Location = System::Drawing::Point(434, 418); 
     this->option2->Name = L"option2"; 
     this->option2->Size = System::Drawing::Size(256, 62); 
     this->option2->TabIndex = 3; 
     this->option2->Text = L"option2"; 
     this->option2->UseVisualStyleBackColor = true; 
     this->option2->Visible = false; 
     // 
     // option3 
     // 
     this->option3->Location = System::Drawing::Point(61, 516); 
     this->option3->Name = L"option3"; 
     this->option3->Size = System::Drawing::Size(256, 62); 
     this->option3->TabIndex = 4; 
     this->option3->Text = L"option3"; 
     this->option3->UseVisualStyleBackColor = true; 
     this->option3->Visible = false; 
     // 
     // option4 
     // 
     this->option4->Location = System::Drawing::Point(434, 516); 
     this->option4->Name = L"option4"; 
     this->option4->Size = System::Drawing::Size(256, 62); 
     this->option4->TabIndex = 5; 
     this->option4->Text = L"option4"; 
     this->option4->UseVisualStyleBackColor = true; 
     this->option4->Visible = false; 
     // 
     // startGame 
     // 
     this->startGame->Location = System::Drawing::Point(276, 317); 
     this->startGame->Name = L"startGame"; 
     this->startGame->Size = System::Drawing::Size(195, 66); 
     this->startGame->TabIndex = 6; 
     this->startGame->Text = L"Start Game"; 
     this->startGame->UseVisualStyleBackColor = true; 
     this->startGame->Click += gcnew System::EventHandler(this, &UserInterface::startGame_Click); 
     // 
     // saveGame 
     // 
     this->saveGame->Location = System::Drawing::Point(13, 13); 
     this->saveGame->Name = L"saveGame"; 
     this->saveGame->Size = System::Drawing::Size(114, 37); 
     this->saveGame->TabIndex = 7; 
     this->saveGame->Text = L"Save Game"; 
     this->saveGame->UseVisualStyleBackColor = true; 
     this->saveGame->Visible = false; 
     // 
     // UserInterface 
     // 
     this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); 
     this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; 
     this->ClientSize = System::Drawing::Size(763, 590); 
     this->Controls->Add(this->saveGame); 
     this->Controls->Add(this->startGame); 
     this->Controls->Add(this->option4); 
     this->Controls->Add(this->option3); 
     this->Controls->Add(this->option2); 
     this->Controls->Add(this->option1); 
     this->Controls->Add(this->pictureBox2); 
     this->Controls->Add(this->pictureBox1); 
     this->Name = L"UserInterface"; 
     this->Text = L"UserInterface"; 
     (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->pictureBox1))->EndInit(); 
     (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->pictureBox2))->EndInit(); 
     this->ResumeLayout(false); 
     this->PerformLayout(); 

    } 
#pragma endregion 
public: System::Void pictureBox2_Click(System::Object^ sender, System::EventArgs^ e) { 
} 
public: System::Void startGame_Click(System::Object^ sender, System::EventArgs^ e) { 

    option1->Visible = true; 
    option2->Visible = true; 
    option3->Visible = true; 
    option4->Visible = true; 
    saveGame->Visible = true; 
    startGame->Visible = false; 
} 
}; 
} 
+1

"それのコードは普通のC++コードです" - 投稿した内容は通常のC++コードではありません。 C++ for .NETプラットフォームのように見えます。 – Sergey

答えて

0

これを修正する方法は2つあります。あなたの友人はこのマシンに仮想マシンをインストールし、VS 2015を実行できます。 2番目の方法はJetbrainsのCLionです。これはC++開発者のためのクールなIDEの1つであり、WindowsとMacの両方で使用できるかもしれません。

+0

ありがとうございます!私はそれが2ヶ月遅い笑のようなものだと知っている –

関連する問題