@ -186,6 +186,7 @@ bool FiestaOnlineEditor::OnUserUpdate(float fElapsedTime){
focusErased=true;
}
w->Cleanup();
delete w;
return true;
} else {
return false;
@ -3,6 +3,8 @@
ItemEditor::ItemEditor(FiestaOnlineEditor*pge,std::string windowTitle,vi2d pos,vi2d size)
:Window(pge,windowTitle,pos,size){}
ItemEditor::~ItemEditor(){};
void ItemEditor::Load(std::string basePath){
ItemInfo.Load(basePath+"/ItemInfo.shn");
@ -10,6 +10,7 @@ class ItemEditor:public Window{
vf2d pos={64,64};
public:
ItemEditor(FiestaOnlineEditor*pge,std::string windowTitle,vi2d pos,vi2d size);
~ItemEditor();
void Load(std::string basePath);
void Refresh(FiestaOnlineEditor*pge)override;
void Update(FiestaOnlineEditor*pge,float fElapsedTime)override;
@ -10,6 +10,8 @@ Window::Window(FiestaOnlineEditor*pge,std::string windowTitle,vi2d pos,vi2d size
//InternalRefresh(pge);
Window::~Window(){};
void Window::InternalUpdate(FiestaOnlineEditor*pge,float fElapsedTime){
if(this==focusedWindow){
Update(pge,fElapsedTime);
@ -19,6 +19,7 @@ protected:
std::string windowTitle="";
Window(FiestaOnlineEditor*pge,std::string windowTitle,vi2d pos,vi2d size);
virtual ~Window();
void InternalUpdate(FiestaOnlineEditor*pge,float fElapsedTime);
virtual void Update(FiestaOnlineEditor*pge,float fElapsedTime)=0;
virtual void Refresh(FiestaOnlineEditor*pge)=0;