Ticket #2375: atlasuifix.patch

File atlasuifix.patch, 4.4 KB (added by infyquest, 10 years ago)
  • source/tools/atlas/AtlasUI/ActorEditor/ActorEditor.cpp

     
    178178        // new format doesn't store the entire path)
    179179        #define THING1(out,outname, in,inname, prefix) \
    180180            wxASSERT( wxString(in["Object"][inname]).StartsWith(_T(prefix)) ); \
    181             out.add(outname, wxString(in["Object"][inname]).Mid(wxString(_T(prefix)).Length()))
     181            out.add(outname, wxString(in["Object"][inname]).Mid(wxString(_T(prefix)).Length()).wc_str())
    182182        #define THING2(out,outname, in,inname, prefix) \
    183183            wxASSERT( wxString(in[inname]).StartsWith(_T(prefix)) ); \
    184             out.add(outname, wxString(in[inname]).Mid(wxString(_T(prefix)).Length()))
     184            out.add(outname, wxString(in[inname]).Mid(wxString(_T(prefix)).Length()).wc_str())
    185185
    186186        if (wxString(in["Object"]["Material"]).Len())
    187187        {
     
    198198        // XXX
    199199        if (wxString(in["Object"]["TextureName"]).StartsWith(_T("art/textures/ui/session/portraits/ui_portrait_sheet_civ_")))
    200200        {
    201             var.add("texture", L"temp/" + wxString(in["Object"]["TextureName"]).Mid(strlen("art/textures/ui/session/portraits/")));
     201            var.add("texture", wxString(wxString(L"temp/") + wxString(in["Object"]["TextureName"]).Mid(strlen("art/textures/ui/session/portraits/"))).wc_str());
    202202        }
    203203        else
    204204        {
  • source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.cpp

     
    232232AtObj MapSettingsControl::UpdateSettingsObject()
    233233{
    234234    // map name
    235     m_MapSettings.set("Name", wxDynamicCast(FindWindow(ID_MapName), wxTextCtrl)->GetValue());
     235    m_MapSettings.set("Name", wxDynamicCast(FindWindow(ID_MapName), wxTextCtrl)->GetValue().wc_str());
    236236
    237237    // map description
    238     m_MapSettings.set("Description", wxDynamicCast(FindWindow(ID_MapDescription), wxTextCtrl)->GetValue());
     238    m_MapSettings.set("Description", wxDynamicCast(FindWindow(ID_MapDescription), wxTextCtrl)->GetValue().wc_str());
    239239
    240240    // map preview
    241     m_MapSettings.set("Preview", wxDynamicCast(FindWindow(ID_MapPreview), wxTextCtrl)->GetValue());
     241    m_MapSettings.set("Preview", wxDynamicCast(FindWindow(ID_MapPreview), wxTextCtrl)->GetValue().wc_str());
    242242
    243243    // reveal map
    244244    m_MapSettings.setBool("RevealMap", wxDynamicCast(FindWindow(ID_MapReveal), wxCheckBox)->GetValue());
    245245
    246246    // game type / victory conditions
    247     m_MapSettings.set("GameType", wxDynamicCast(FindWindow(ID_MapType), wxChoice)->GetStringSelection());
     247    m_MapSettings.set("GameType", wxDynamicCast(FindWindow(ID_MapType), wxChoice)->GetStringSelection().wc_str());
    248248
    249249    // keywords
    250250    {
  • source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.cpp

     
    858858        // name
    859859        wxTextCtrl* text = controls.name;
    860860        if (text->IsEnabled())
    861             player.set("Name", text->GetValue());
     861            player.set("Name", text->GetValue().wc_str());
    862862
    863863        // civ
    864864        wxChoice* choice = controls.civ;
     
    865865        if (choice->IsEnabled() && choice->GetSelection() >= 0)
    866866        {
    867867            wxStringClientData* str = dynamic_cast<wxStringClientData*>(choice->GetClientObject(choice->GetSelection()));
    868             player.set("Civ", str->GetData());
     868            player.set("Civ", str->GetData().wc_str());
    869869        }
    870870
    871871        // colour
     
    887887            {
    888888                // ai - get id
    889889                wxStringClientData* str = dynamic_cast<wxStringClientData*>(choice->GetClientObject(choice->GetSelection()));
    890                 player.set("AI", str->GetData());
     890                player.set("AI", str->GetData().wc_str());
    891891            }
    892892            else // human
    893893                player.set("AI", _T(""));