mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-22 10:05:37 -04:00
ee090a9866
git-svn-id: svn://localhost@698 8062f311-0dae-4547-b526-b8ab9ac864a5
125 lines
6.9 KiB
C++
125 lines
6.9 KiB
C++
/** \file
|
|
* Game Develop
|
|
* 2008-2012 Florian Rival (Florian.Rival@gmail.com)
|
|
*/
|
|
#include "ErrorCompilation.h"
|
|
|
|
//(*InternalHeaders(ErrorCompilation)
|
|
|
|
#include <wx/bitmap.h>
|
|
|
|
#include <wx/settings.h>
|
|
|
|
#include <wx/font.h>
|
|
|
|
#include <wx/intl.h>
|
|
|
|
#include <wx/image.h>
|
|
|
|
#include <wx/string.h>
|
|
|
|
//*)
|
|
|
|
#ifdef DEBUG
|
|
|
|
#endif
|
|
|
|
//(*IdInit(ErrorCompilation)
|
|
|
|
const long ErrorCompilation::ID_STATICBITMAP3 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_STATICTEXT1 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_PANEL1 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_STATICLINE2 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_TEXTCTRL1 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_STATICLINE1 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_STATICTEXT2 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_STATICTEXT3 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_STATICLINE3 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_STATICTEXT4 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_BUTTON2 = wxNewId();
|
|
|
|
const long ErrorCompilation::ID_BUTTON1 = wxNewId();
|
|
|
|
//*)
|
|
|
|
BEGIN_EVENT_TABLE(ErrorCompilation,wxDialog)
|
|
//(*EventTable(ErrorCompilation)
|
|
//*)
|
|
END_EVENT_TABLE()
|
|
|
|
ErrorCompilation::ErrorCompilation(wxWindow* parent, string report)
|
|
{
|
|
//(*Initialize(ErrorCompilation)
|
|
|
|
wxFlexGridSizer* FlexGridSizer4;
|
|
|
|
wxFlexGridSizer* FlexGridSizer3;
|
|
|
|
wxFlexGridSizer* FlexGridSizer2;
|
|
|
|
wxFlexGridSizer* FlexGridSizer6;
|
|
|
|
wxFlexGridSizer* FlexGridSizer1;
|
|
|
|
|
|
Create(parent, wxID_ANY, _("Erreur(s) lors de la compilation"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER, _T("wxID_ANY"));
|
|
|
|
FlexGridSizer1 = new wxFlexGridSizer(0, 1, 0, 0);
|
|
|
|
FlexGridSizer1->AddGrowableCol(0);
|
|
|
|
FlexGridSizer1->AddGrowableRow(2);
|
|
|
|
Panel1 = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxSize(420,54), wxTAB_TRAVERSAL, _T("ID_PANEL1"));
|
|
|
|
Panel1->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
|
|
|
FlexGridSizer6 = new wxFlexGridSizer(0, 2, 0, 0);
|
|
|
|
StaticBitmap3 = new wxStaticBitmap(Panel1, ID_STATICBITMAP3, wxBitmap(wxImage(_T("res/error24.png"))), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICBITMAP3"));
|
|
|
|
FlexGridSizer6->Add(StaticBitmap3, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
|
|
|
|
StaticText1 = new wxStaticText(Panel1, ID_STATICTEXT1, _("Une erreur s\'est produite lors de la compilation, et le jeu n\'a pas pu être créé.\nConsultez le rapport ci dessous pour savoir quelle étape a provoqué une erreur."), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE, _T("ID_STATICTEXT1"));
|
|
|
|
FlexGridSizer6->Add(StaticText1, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
|
|
|
|
Panel1->SetSizer(FlexGridSizer6);
|
|
|
|
FlexGridSizer6->SetSizeHints(Panel1);
|
|
|
|
FlexGridSizer1->Add(Panel1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
|
|
|
|
StaticLine2 = new wxStaticLine(this, ID_STATICLINE2, wxDefaultPosition, wxSize(10,-1), wxLI_HORIZONTAL, _T("ID_STATICLINE2"));
|
|
|
|
FlexGridSizer1->Add(StaticLine2, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
|
|
|
|
FlexGridSizer2 = new wxFlexGridSizer(0, 3, 0, 0);
|
|
|
|
FlexGridSizer2->AddGrowableCol(0);
|
|
|
|
FlexGridSizer2->AddGrowableRow(0);
|
|
|
|
ReportEdit = new wxTextCtrl(this, ID_TEXTCTRL1, _("Pas d\'informations concernant l\'erreur."), wxDefaultPosition, wxSize(253,97), wxTE_MULTILINE|wxTE_READONLY, wxDefaultValidator, _T("ID_TEXTCTRL1"));
|
|
|
|
FlexGridSizer2->Add(ReportEdit, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
|
|
|
StaticLine1 = new wxStaticLine(this, ID_STATICLINE1, wxDefaultPosition, wxSize(-1,90), wxLI_VERTICAL, _T("ID_STATICLINE1"));
|
|
|
|
FlexGridSizer2->Add(StaticLine1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
|
|
|
|
FlexGridSizer3 = new wxFlexGridSizer(0, 1, 0, 0);
|
|
|
|
StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("Comment résoudre le problème \?"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT2"));
|
|
|
|
wxFont StaticText2Font(wxDEFAULT,wxDEFAULT,wxFONTSTYLE_NORMAL,wxBOLD,false,wxEmptyString,wxFONTENCODING_DEFAULT);
|
|
|
|
StaticText2->SetFont(StaticText2Font);
|
|
|
|
FlexGridSizer3->Add(StaticText2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
|
|
|
StaticText3 = new wxStaticText(this, ID_STATICTEXT3, _("D\'un problème lors de la copie d\'un fichier connu :\n -Vérifiez que votre fichier ( image, son... ) existe bien.\n -Que vous possédez les droits d\'écriture et/ou de lecture.\n\nD\'un problème lors de la copie d\'un fichier inconnu :\n -Vérifiez que le fichier en question existe bien.\n Si non, tentez de réinstaller Game Develop\n -Que vous possédez les droits d\'écriture et/ou de lecture.\n\nD\'un problème lors de la création d\'un fichier :\n -Vérifiez que vous possédez les droits d\'écriture \n et/ou de lecture."), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3"));
|
|
|
|
FlexGridSizer3->Add(StaticText3, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
|
|
|
FlexGridSizer2->Add(FlexGridSizer3, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
|
|
|
|
FlexGridSizer1->Add(FlexGridSizer2, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
|
|
|
|
StaticLine3 = new wxStaticLine(this, ID_STATICLINE3, wxDefaultPosition, wxSize(10,-1), wxLI_HORIZONTAL, _T("ID_STATICLINE3"));
|
|
|
|
FlexGridSizer1->Add(StaticLine3, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
|
|
|
|
FlexGridSizer4 = new wxFlexGridSizer(0, 3, 0, 0);
|
|
|
|
FlexGridSizer4->AddGrowableCol(0);
|
|
|
|
StaticText4 = new wxStaticText(this, ID_STATICTEXT4, _("Si vous n\'arrivez pas à résoudre le problème, n\'hésitez pas à nous contacter"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT4"));
|
|
|
|
wxFont StaticText4Font(wxDEFAULT,wxDEFAULT,wxFONTSTYLE_ITALIC,wxNORMAL,false,wxEmptyString,wxFONTENCODING_DEFAULT);
|
|
|
|
StaticText4->SetFont(StaticText4Font);
|
|
|
|
FlexGridSizer4->Add(StaticText4, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
|
|
|
FermerBt = new wxButton(this, ID_BUTTON2, _("Fermer"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
|
|
|
|
FlexGridSizer4->Add(FermerBt, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
|
|
|
AideBt = new wxButton(this, ID_BUTTON1, _("Aide"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
|
|
|
|
FlexGridSizer4->Add(AideBt, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
|
|
|
|
FlexGridSizer1->Add(FlexGridSizer4, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
|
|
|
|
SetSizer(FlexGridSizer1);
|
|
|
|
FlexGridSizer1->Fit(this);
|
|
|
|
FlexGridSizer1->SetSizeHints(this);
|
|
|
|
Center();
|
|
|
|
|
|
Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ErrorCompilation::OnFermerBtClick);
|
|
|
|
Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ErrorCompilation::OnAideBtClick);
|
|
|
|
//*)
|
|
|
|
if (report != "")
|
|
{
|
|
ReportEdit->Clear();
|
|
ReportEdit->AppendText(report);
|
|
}
|
|
}
|
|
|
|
ErrorCompilation::~ErrorCompilation()
|
|
{
|
|
//(*Destroy(ErrorCompilation)
|
|
//*)
|
|
}
|
|
|
|
|
|
void ErrorCompilation::OnAideBtClick(wxCommandEvent& event)
|
|
{
|
|
}
|
|
|
|
void ErrorCompilation::OnFermerBtClick(wxCommandEvent& event)
|
|
{
|
|
EndModal(0);
|
|
}
|