Moderator ALLex Posted October 18 Moderator Share Posted October 18 EterPythonLib\PythonWindowManagerModule.cpp // Search for this function PyObject* wndImageLoadImage(PyObject* poSelf, PyObject* poArgs) { // ... existing code ... } // Add below PyObject* wndImageUnloadImage(PyObject* poSelf, PyObject* poArgs) { UI::CWindow* pWindow; if (!PyTuple_GetWindow(poArgs, 0, &pWindow)) { return Py_BuildException(); } if (!((UI::CImageBox*)pWindow)->UnloadImage()) { return Py_BuildException("Failed to unload image"); } return Py_BuildNone(); } // Search for this method registration { "LoadImage", wndImageLoadImage, METH_VARARGS }, // Add below { "UnloadImage", wndImageUnloadImage, METH_VARARGS }, EterPythonLib\PythonWindow.cpp // Search for this method BOOL CImageBox::LoadImage(const char* c_szFileName) { // ... existing code ... } // Add below BOOL CImageBox::UnloadImage() { if (!m_pImageInstance) return FALSE; OnDestroyInstance(); return TRUE; } EterPythonLib\PythonWindow.h // Search for this method declaration BOOL LoadImage(const char* c_szFileName); // Add below BOOL UnloadImage(); root/ui.py # Search for this class definition class ImageBox(Window): # ... existing members ... # Find these lines self.eventFunc = {} self.eventArgs = {} # Add below self.imageLoaded = False # ... # Search for this line where you load the image wndMgr.LoadImage(self.hWnd, imageName) # Add below self.imageLoaded = True # ... # Search for this destructor definition def __del__(self): # ... existing code ... # Add below if self.imageLoaded: self.UnloadImage() 1 Quote Link to comment Share on other sites More sharing options...
Bot Metin2 Bot Posted October 18 Bot Share Posted October 18 Thank you for the post Metin2Downloads Now we will take care that your topic reaches many people by adding tags Forum Description : Metin2 Server Files, Server Files, Metin2 Private Servers, Metin2, Metin2 Systems, C++ and Python, Metin2 Home Pages, Metin2 Private Server, Metin2 Download, Metin2 Support, Metin2 Forum, Metin2 Pvp Servers, Errors, Bugs, Requests, Metin2 Pvp Forum, Everything About Metin2. Tags: #Metin2 Server Files, #Server Files, #Metin2 Private Servers, #Metin2, #Metin2 Systems, #C++ and Python, #Metin2 Home Pages, #Metin2 Private Server, #Metin2 Download, #Metin2 Support, #Metin2 Forum, #Metin2 Pvp Servers, #Errors, #Bugs, #Requests, #Metin2 Pvp #Forum . Quote Link to comment Share on other sites More sharing options...
Administrator xpro Posted October 18 Administrator Share Posted October 18 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.