- Timestamp:
- 08/19/11 01:38:11 (13 years ago)
- Location:
- ps/trunk/source/tools/atlas/AtlasUI
- Files:
-
- 16 edited
-
CustomControls/Canvas/Canvas.cpp (modified) (1 diff)
-
CustomControls/Canvas/Canvas.h (modified) (2 diffs)
-
General/VideoRecorder/VideoRecorder.cpp (modified) (1 diff)
-
Misc/DLLInterface.cpp (modified) (3 diffs)
-
ScenarioEditor/ScenarioEditor.cpp (modified) (7 diffs)
-
ScenarioEditor/SectionLayout.cpp (modified) (1 diff)
-
ScenarioEditor/Sections/Cinematic/Cinematic.cpp (modified) (1 diff)
-
ScenarioEditor/Sections/Map/Map.cpp (modified) (4 diffs)
-
ScenarioEditor/Sections/Object/Object.cpp (modified) (1 diff)
-
ScenarioEditor/Sections/Player/Player.cpp (modified) (2 diffs)
-
ScenarioEditor/Sections/Terrain/Terrain.cpp (modified) (3 diffs)
-
ScenarioEditor/Tools/Common/ObjectSettings.cpp (modified) (1 diff)
-
ScenarioEditor/Tools/FillTerrain.cpp (modified) (1 diff)
-
ScenarioEditor/Tools/PaintTerrain.cpp (modified) (1 diff)
-
ScenarioEditor/Tools/PlaceObject.cpp (modified) (1 diff)
-
ScenarioEditor/Tools/ReplaceTerrain.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp
r6910 r10037 24 24 25 25 Canvas::Canvas(wxWindow* parent, int* attribList, long style) 26 : wxGLCanvas(parent, -1, wxDefaultPosition, wxDefaultSize, style, _T("GLCanvas"), attribList), 26 : wxGLCanvas(parent, -1, attribList, wxDefaultPosition, wxDefaultSize, style, _T("GLCanvas")), 27 m_GLContext(this), 27 28 m_SuppressResize(true), 28 29 m_LastMousePos(-1, -1), m_MouseCaptured(false) 29 30 { 31 } 32 33 void Canvas::SetCurrent() 34 { 35 m_GLContext.SetCurrent(*this); 30 36 } 31 37 -
ps/trunk/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.h
r6910 r10037 24 24 25 25 void InitSize(); 26 27 void SetCurrent(); 28 26 29 protected: 27 30 virtual void HandleMouseEvent(wxMouseEvent& evt) = 0; … … 32 35 void OnMouse(wxMouseEvent& evt); 33 36 37 wxGLContext m_GLContext; 38 34 39 bool m_SuppressResize; 35 40 -
ps/trunk/source/tools/atlas/AtlasUI/General/VideoRecorder/VideoRecorder.cpp
r6910 r10037 201 201 VideoEncoder venc (dlg.m_Filename, dlg.m_Framerate, dlg.m_Bitrate, duration, w, h); 202 202 203 qCinemaRecord qry( trackName.c_str(), dlg.m_Framerate, duration, w, h, Callback<sCinemaRecordCB>(&callback, (void*)&venc));203 qCinemaRecord qry((std::wstring)trackName.wc_str(), dlg.m_Framerate, duration, w, h, Callback<sCinemaRecordCB>(&callback, (void*)&venc)); 204 204 qry.Post(); 205 205 -
ps/trunk/source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp
r9987 r10037 232 232 if (argc > 1) 233 233 { 234 wx Char*filename = argv[1];234 wxString filename = argv[1]; 235 235 236 236 if (filename[0] != _T('-')) // ignore -options … … 241 241 } 242 242 else 243 wxLogError(_("Cannot find file '%s'"), filename );243 wxLogError(_("Cannot find file '%s'"), filename.c_str()); 244 244 } 245 245 } … … 332 332 }; 333 333 334 IMPLEMENT_APP_NO_MAIN(AtlasDLLApp) 334 IMPLEMENT_APP_NO_MAIN(AtlasDLLApp); -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp
r9797 r10037 57 57 ATLASDLLIMPEXP void Atlas_GLSetCurrent(void* canvas) 58 58 { 59 static_cast< wxGLCanvas*>(canvas)->SetCurrent();59 static_cast<Canvas*>(canvas)->SetCurrent(); 60 60 } 61 61 62 62 ATLASDLLIMPEXP void Atlas_GLSwapBuffers(void* canvas) 63 63 { 64 static_cast< wxGLCanvas*>(canvas)->SwapBuffers();64 static_cast<Canvas*>(canvas)->SwapBuffers(); 65 65 } 66 66 … … 359 359 // Global application initialisation: 360 360 361 wxImage::AddHandler(new wxICOHandler); 362 361 363 // wxLog::SetTraceMask(wxTraceMessages); 362 364 … … 370 372 wxFileName filename (relativePath, wxPATH_UNIX); 371 373 filename.MakeAbsolute(Datafile::GetDataDirectory()); 372 SetIcon(wxIcon(filename.GetFullPath() ));374 SetIcon(wxIcon(filename.GetFullPath(), wxBITMAP_TYPE_ICO)); 373 375 } 374 376 #endif … … 609 611 610 612 // TODO: Work when the map is not in .../maps/scenarios/ 611 std::wstring map = name.c_str();613 std::wstring map(name.wc_str()); 612 614 613 615 // Deactivate tools, so they don't carry forwards into the new CWorld … … 680 682 m_ToolManager.SetCurrentTool(_T("")); 681 683 682 std::wstring map = m_OpenFilename.c_str();684 std::wstring map(m_OpenFilename.wc_str()); 683 685 POST_MESSAGE(SaveMap, (map)); 684 686 … … 703 705 704 706 // TODO: Work when the map is not in .../maps/scenarios/ 705 std::wstring map = dlg.GetFilename().c_str();707 std::wstring map(dlg.GetFilename().wc_str()); 706 708 POST_MESSAGE(SaveMap, (map)); 707 709 … … 752 754 if (cmd.IsEmpty()) 753 755 return; 754 POST_MESSAGE(JavaScript, ( cmd.c_str()));756 POST_MESSAGE(JavaScript, ((std::wstring)cmd.wc_str())); 755 757 } 756 758 -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.cpp
r9609 r10037 309 309 void SectionLayout::SelectPage(const wxString& classname) 310 310 { 311 std::map<std::wstring, int>::iterator it = m_PageMappings.find( classname.c_str());311 std::map<std::wstring, int>::iterator it = m_PageMappings.find((std::wstring)classname.wc_str()); 312 312 if (it != m_PageMappings.end()) 313 313 m_SidebarBook->SetSelection(it->second); -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Cinematic/Cinematic.cpp
r6910 r10037 59 59 { 60 60 m_OldScale = CinemaTextFloat(*m_TimeText, 2, -5.f, 5.f, m_OldScale); 61 m_Sidebar->UpdatePath( m_Name->GetLineText(0).wc_str(), m_OldScale);61 m_Sidebar->UpdatePath((std::wstring)m_Name->GetLineText(0).wc_str(), m_OldScale); 62 62 } 63 63 void Update(std::wstring name, float scale) -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.cpp
r10006 r10037 145 145 gameTypes.Add(_T("endless")); 146 146 147 wxFlexGridSizer* gridSizer = new wxFlexGridSizer(2, 2,5, 5);147 wxFlexGridSizer* gridSizer = new wxFlexGridSizer(2, 5, 5); 148 148 gridSizer->Add(new wxStaticText(this, wxID_ANY, _("Reveal map")), wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT)); 149 149 gridSizer->Add(new wxCheckBox(this, ID_MapReveal, wxEmptyString)); … … 157 157 158 158 wxStaticBoxSizer* keywordsSizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Keywords")); 159 wxFlexGridSizer* kwGridSizer = new wxFlexGridSizer(2, 2,5, 5);159 wxFlexGridSizer* kwGridSizer = new wxFlexGridSizer(2, 5, 5); 160 160 kwGridSizer->Add(new wxStaticText(this, wxID_ANY, _("Demo")), wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT)); 161 161 kwGridSizer->Add(new wxCheckBox(this, ID_MapKW_Demo, wxEmptyString)); … … 273 273 sizer->AddSpacer(5); 274 274 275 wxFlexGridSizer* gridSizer = new wxFlexGridSizer(2, 2,5, 5);275 wxFlexGridSizer* gridSizer = new wxFlexGridSizer(2, 5, 5); 276 276 gridSizer->AddGrowableCol(1); 277 277 … … 484 484 wxString scriptName(settings["Script"]); 485 485 486 AtlasMessage::qGenerateMap qry( scriptName.c_str(), json);486 AtlasMessage::qGenerateMap qry((std::wstring)scriptName.wc_str(), json); 487 487 qry.Post(); 488 488 489 489 if (qry.status < 0) 490 wxLogError(_("Random map script '%ls' failed"), scriptName.c_str()); 490 { 491 wxLogError(_("Random map script '%ls' failed"), scriptName.wc_str()); 492 } 491 493 492 494 m_ScenarioEditor.NotifyOnMapReload(); -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp
r9617 r10037 105 105 void ActorViewerPostToGame() 106 106 { 107 POST_MESSAGE(SetActorViewer, ( m_ActorViewerEntity.c_str(), m_ActorViewerAnimation.c_str(), m_ActorViewerSpeed, false));107 POST_MESSAGE(SetActorViewer, ((std::wstring)m_ActorViewerEntity.wc_str(), (std::wstring)m_ActorViewerAnimation.wc_str(), m_ActorViewerSpeed, false)); 108 108 } 109 109 }; -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.cpp
r9786 r10037 73 73 // Player Info 74 74 wxStaticBoxSizer* playerInfoSizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Player info")); 75 wxFlexGridSizer* gridSizer = new wxFlexGridSizer(2, 2,5, 5);75 wxFlexGridSizer* gridSizer = new wxFlexGridSizer(2, 5, 5); 76 76 gridSizer->AddGrowableCol(1); 77 77 gridSizer->Add(new wxStaticText(this, wxID_ANY, _("Name")), wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT)); … … 98 98 // Resources 99 99 wxStaticBoxSizer* resourceSizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Resources")); 100 gridSizer = new wxFlexGridSizer(2, 2,5, 5);100 gridSizer = new wxFlexGridSizer(2, 5, 5); 101 101 gridSizer->AddGrowableCol(1); 102 102 gridSizer->Add(new wxStaticText(this, wxID_ANY, _("Food")), wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT)); -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Terrain/Terrain.cpp
r10029 r10037 95 95 m_MainSizer->Add(sizer, wxSizerFlags().Expand().Border(wxTOP, 10)); 96 96 97 wxSizer* visSizer = new wxFlexGridSizer(2, 2,5, 5);97 wxSizer* visSizer = new wxFlexGridSizer(2, 5, 5); 98 98 sizer->Add(visSizer); 99 99 … … 137 137 POST_MESSAGE(SetViewParamS, (AtlasMessage::eRenderView::GAME, L"passability", L"")); 138 138 else 139 POST_MESSAGE(SetViewParamS, (AtlasMessage::eRenderView::GAME, L"passability", evt.GetString().c_str()));139 POST_MESSAGE(SetViewParamS, (AtlasMessage::eRenderView::GAME, L"passability", (std::wstring)evt.GetString().wc_str())); 140 140 } 141 141 … … 227 227 m_LastTerrainSelection = NULL; // clear any reference to deleted button 228 228 229 AtlasMessage::qGetTerrainGroupPreviews qry( m_Name.c_str(), imageWidth, imageHeight);229 AtlasMessage::qGetTerrainGroupPreviews qry((std::wstring)m_Name.wc_str(), imageWidth, imageHeight); 230 230 qry.Post(); 231 231 -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp
r9559 r10037 99 99 ++it) 100 100 { 101 selections.push_back( it->c_str());101 selections.push_back((std::wstring)it->wc_str()); 102 102 } 103 103 settings.selections = selections; -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/FillTerrain.cpp
r10031 r10037 58 58 Position pos(evt.GetPosition()); 59 59 POST_MESSAGE(BrushPreview, (true, pos)); 60 POST_COMMAND(FillTerrain, (pos, g_SelectedTexture.c_str()));60 POST_COMMAND(FillTerrain, (pos, (std::wstring)g_SelectedTexture.wc_str())); 61 61 return true; 62 62 } -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PaintTerrain.cpp
r6910 r10037 116 116 { 117 117 POST_MESSAGE(BrushPreview, (true, obj->m_Pos)); 118 POST_COMMAND(PaintTerrain, (obj->m_Pos, g_SelectedTexture.c_str(), GetPriority()));118 POST_COMMAND(PaintTerrain, (obj->m_Pos, (std::wstring)g_SelectedTexture.wc_str(), GetPriority())); 119 119 } 120 120 -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/PlaceObject.cpp
r6910 r10037 49 49 bool useTarget = (dragDistSq >= 16*16); 50 50 if (preview) 51 POST_MESSAGE(ObjectPreview, ( m_ObjectID.c_str(), GetScenarioEditor().GetObjectSettings().GetSettings(), m_ObjPos, useTarget, m_Target, g_DefaultAngle));51 POST_MESSAGE(ObjectPreview, ((std::wstring)m_ObjectID.wc_str(), GetScenarioEditor().GetObjectSettings().GetSettings(), m_ObjPos, useTarget, m_Target, g_DefaultAngle)); 52 52 else 53 POST_COMMAND(CreateObject, ( m_ObjectID.c_str(), GetScenarioEditor().GetObjectSettings().GetSettings(), m_ObjPos, useTarget, m_Target, g_DefaultAngle));53 POST_COMMAND(CreateObject, ((std::wstring)m_ObjectID.wc_str(), GetScenarioEditor().GetObjectSettings().GetSettings(), m_ObjPos, useTarget, m_Target, g_DefaultAngle)); 54 54 } 55 55 -
ps/trunk/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ReplaceTerrain.cpp
r9566 r10037 58 58 Position pos(evt.GetPosition()); 59 59 POST_MESSAGE(BrushPreview, (true, pos)); 60 POST_COMMAND(ReplaceTerrain, (pos, g_SelectedTexture.c_str()));60 POST_COMMAND(ReplaceTerrain, (pos, (std::wstring)g_SelectedTexture.wc_str())); 61 61 return true; 62 62 }
Note:
See TracChangeset
for help on using the changeset viewer.
