mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-22 01:55:25 -04:00
156a0bc3f9
git-svn-id: svn://localhost@388 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
|
|
/*GDpriv::ExtensionsManager * extensionsManager = GDpriv::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;
|
|
}
|