mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-22 01:55:25 -04:00
c5e5e0336d
Corrected layer without camera when adding a layer. Added a boolean to indicate to ChooseLayer dialog if it must add quotes or not. Modified Image manager to load images on demand. git-svn-id: svn://localhost@192 8062f311-0dae-4547-b526-b8ab9ac864a5
37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
#include <wx/log.h>
|
|
|
|
#include "DndTextObjectsEditor.h"
|
|
#include "EditorObjectList.h"
|
|
#include "GDL/ExtensionsManager.h"
|
|
#include "GDL/SpriteObject.h"
|
|
|
|
/**
|
|
* Create a object with an initial image
|
|
*/
|
|
bool DndTextObjectsEditor::OnDropText(wxCoord x, wxCoord y, const wxString& text)
|
|
{
|
|
//TODO : Remake me in GDL Fahsion
|
|
/*gdp::ExtensionsManager * extensionsManager = gdp::ExtensionsManager::getInstance();
|
|
|
|
if ( extensionsManager->GetTypeIdFromString("Sprite") == 0 )
|
|
return true; //No such extension loaded.
|
|
|
|
boost::shared_ptr<SpriteObject> object = boost::static_pointer_cast<SpriteObject>(
|
|
extensionsManager->CreateObject(extensionsManager->GetTypeIdFromString("Sprite"),
|
|
string(text.mb_str())));
|
|
|
|
Sprite sprite;
|
|
sprite.SetImageName(string(text.mb_str()));
|
|
|
|
Animation animation;
|
|
animation.SetDirectionsNumber(8);
|
|
animation.GetDirectionToModify(0).AddSprite(sprite);
|
|
object->AddAnimation( animation );
|
|
|
|
editor.objects->push_back( object );
|
|
|
|
editor.Refresh();*/
|
|
|
|
return true;
|
|
}
|