mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-22 01:55:25 -04:00
8672f179e9
Gui elements in SceneCanvas are now independant from the zoom factor. Work in progress: NewProjectDialog. git-svn-id: svn://localhost@837 8062f311-0dae-4547-b526-b8ab9ac864a5
203 lines
6.9 KiB
C++
203 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, _("Error(s) during 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, _("An error occurred during the compilation, and the game could not be created.\nSee the report below to see which step caused an error."), 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, _("No information concerning the error."), 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, _("How solve the problem \?"), 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, _("A problem when copying a known file:\n -Check that your file (image, sound ...) exists.\n -Check you have read/write permission. \n\nA problem when copying a file unknown:\n -Check that the file in question exists. \n If not, try reinstalling Game Develop\n -Check you have read/write permission.\n\nA problem when creating a file:\n -Make sure you have read/write\n permission."), 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, _("If you can not solve the problem, do not hesitate to contact us"), 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, _("Close"), 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, _("Help"), 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);
|
|
}
|
|
|