mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-22 10:05:37 -04:00
d9c92facda
Started adding support for "dynamic extensions", meant to be written/compiled within Game Develop. In SceneCanvas::Reload, now destroy and recreate scene member when reloading, as it is necessary for dynamic libraries for example to have explicit scene destruction when preview is ended. Renamed GDE define to GD_IDE_ONLY. Renamed old gdp namespace to GDpriv. git-svn-id: svn://localhost@345 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;
|
|
}
|