Fixes use of deprecated wxWidgets constants as they don't work on all platforms (only when the library was built with WXWIN_COMPATIBILITY_2_6).
This was SVN commit r10095.
This commit is contained in:
parent
9090545852
commit
2d1fe050b9
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2009 Wildfire Games.
|
||||
/* Copyright (C) 2011 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -384,7 +384,7 @@ void ActorEditor::OnCreateEntity(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
wxString parentEntityFilename
|
||||
(wxFileSelector(_("Choose a parent entity"), entityPath.GetPath(), _T(""),
|
||||
_T("xml"), _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxOPEN, this));
|
||||
_T("xml"), _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_OPEN, this));
|
||||
|
||||
if (! parentEntityFilename.Length())
|
||||
return; // cancelled by user
|
||||
@ -394,7 +394,7 @@ void ActorEditor::OnCreateEntity(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
wxString outputEntityFilename
|
||||
(wxFileSelector(_("Choose a filename to save as"), entityPath.GetPath(), entityName,
|
||||
_T("xml"), _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxSAVE|wxOVERWRITE_PROMPT, this));
|
||||
_T("xml"), _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT, this));
|
||||
|
||||
if (! outputEntityFilename.Length())
|
||||
return; // cancelled by user
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2009 Wildfire Games.
|
||||
/* Copyright (C) 2011 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -138,7 +138,7 @@ public:
|
||||
defaultFile = wxEmptyString;
|
||||
}
|
||||
|
||||
wxFileDialog dlg(this, _("Choose a file"), defaultDir, defaultFile, m_FileMask, wxOPEN);
|
||||
wxFileDialog dlg(this, _("Choose a file"), defaultDir, defaultFile, m_FileMask, wxFD_OPEN);
|
||||
|
||||
parent->m_DisableKillFocus = true;
|
||||
int ret = dlg.ShowModal();
|
||||
|
@ -215,7 +215,7 @@ void AtlasWindow::OnOpen(wxCommandEvent& WXUNUSED(event))
|
||||
path = GetDefaultOpenDirectory();
|
||||
}
|
||||
|
||||
wxFileDialog dlg (this, _("Select XML file to open"), path, name, _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxOPEN);
|
||||
wxFileDialog dlg (this, _("Select XML file to open"), path, name, _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_OPEN);
|
||||
|
||||
if (dlg.ShowModal() != wxID_OK)
|
||||
return;
|
||||
@ -262,7 +262,7 @@ bool AtlasWindow::SaveChanges(bool forceSaveAs)
|
||||
wxFileDialog dlg (this, _("Select XML file to save as"),
|
||||
GetCurrentFilename().GetPath(), GetCurrentFilename().GetFullName(),
|
||||
//_T(""), _T(""),
|
||||
_("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxSAVE | wxOVERWRITE_PROMPT);
|
||||
_("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
||||
|
||||
if (dlg.ShowModal() != wxID_OK)
|
||||
return false;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2009 Wildfire Games.
|
||||
/* Copyright (C) 2011 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -159,7 +159,7 @@ private:
|
||||
wxTextCtrl* filenameWin = wxDynamicCast(FindWindow(ID_FILENAME), wxTextCtrl);
|
||||
wxCHECK(filenameWin, );
|
||||
|
||||
wxFileDialog dlg (this, wxFileSelectorPromptStr, filenameWin->GetValue(), filenameWin->GetValue(), _("MP4 files (*.mp4)|*.mp4"), wxSAVE);
|
||||
wxFileDialog dlg (this, wxFileSelectorPromptStr, filenameWin->GetValue(), filenameWin->GetValue(), _("MP4 files (*.mp4)|*.mp4"), wxFD_SAVE);
|
||||
if (dlg.ShowModal() != wxID_OK)
|
||||
return;
|
||||
|
||||
|
@ -637,7 +637,7 @@ void ScenarioEditor::OnOpen(wxCommandEvent& WXUNUSED(event))
|
||||
wxFileDialog dlg (NULL, wxFileSelectorPromptStr,
|
||||
Datafile::GetDataDirectory() + _T("/mods/public/maps/scenarios"), m_OpenFilename,
|
||||
_T("PMP files (*.pmp)|*.pmp|All files (*.*)|*.*"),
|
||||
wxOPEN);
|
||||
wxFD_OPEN);
|
||||
|
||||
wxString cwd = wxFileName::GetCwd();
|
||||
|
||||
@ -695,7 +695,7 @@ void ScenarioEditor::OnSaveAs(wxCommandEvent& WXUNUSED(event))
|
||||
wxFileDialog dlg (NULL, wxFileSelectorPromptStr,
|
||||
Datafile::GetDataDirectory() + _T("/mods/public/maps/scenarios"), m_OpenFilename,
|
||||
_T("PMP files (*.pmp)|*.pmp|All files (*.*)|*.*"),
|
||||
wxSAVE | wxOVERWRITE_PROMPT);
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
||||
|
||||
if (dlg.ShowModal() == wxID_OK)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2009 Wildfire Games.
|
||||
/* Copyright (C) 2011 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -115,8 +115,8 @@ public:
|
||||
void RotateTick(float dt)
|
||||
{
|
||||
int dir = 0;
|
||||
if (wxGetKeyState(WXK_NEXT)) ++dir; // page-down key
|
||||
if (wxGetKeyState(WXK_PRIOR)) --dir; // page-up key
|
||||
if (wxGetKeyState(WXK_PAGEDOWN)) ++dir; // page-down key
|
||||
if (wxGetKeyState(WXK_PAGEUP)) --dir; // page-up key
|
||||
if (dir)
|
||||
{
|
||||
float speed = M_PI/2.f * ScenarioEditor::GetSpeedModifier(); // radians per second
|
||||
|
Loading…
Reference in New Issue
Block a user