Suky 1 Posted May 24, 2017 Share Posted May 24, 2017 (edited) Hi guys , i have a little but difficult problem. I Press escape key on game window but not open SystemDialog . I Have not syserr but my tracef on debug : https://metin2.download/picture/ti55EoYtbCP75MCR01mTtC9QyGU8QS5A/.png https://metin2.download/picture/1SkHLuuYoYHlQF2WN7b8CD0r7E4T36VA/.png https://metin2.download/picture/R2Wwl5Kz79qnlXBW70vUOig70me1cVo0/.png My Event : BOOL CWindow::RunPressEscapeKeyEvent() { TWindowContainer::reverse_iterator itor; for (itor = m_pChildList.rbegin(); itor != m_pChildList.rend(); ++itor) { CWindow * pWindow = *itor; if (pWindow->IsShow()) { Tracenf("CloseWindow: %s", pWindow->GetName()); if (pWindow->RunPressEscapeKeyEvent()) return TRUE; } } Tracenf("CloseWindow2: %s", this->GetName()); if (OnPressEscapeKey()) return TRUE; Tracenf("CloseWindow3: %s", this->GetName()); return FALSE; } Thanks . Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Tasho 243 Posted May 24, 2017 Share Posted May 24, 2017 Be sure you have same on root/game.py def OnPressEscapeKey(self): if app.TARGET == app.GetCursor(): app.SetCursor(app.NORMAL) elif TRUE == mouseModule.mouseController.isAttached(): mouseModule.mouseController.DeattachObject() else: self.interface.OpenSystemDialog() return TRUE Link to comment Share on other sites More sharing options...
Suky 1 Posted May 24, 2017 Author Share Posted May 24, 2017 3 minutes ago, Tasho said: Be sure you have same on root/game.py def OnPressEscapeKey(self): if app.TARGET == app.GetCursor(): app.SetCursor(app.NORMAL) elif TRUE == mouseModule.mouseController.isAttached(): mouseModule.mouseController.DeattachObject() else: self.interface.OpenSystemDialog() return TRUE def OnPressEscapeKey(self): if app.TARGET == app.GetCursor(): app.SetCursor(app.NORMAL) elif True == mouseModule.mouseController.isAttached(): mouseModule.mouseController.DeattachObject() else: self.interface.OpenSystemDialog() return True Link to comment Share on other sites More sharing options...
Tasho 243 Posted May 24, 2017 Share Posted May 24, 2017 Then go and make a dbg on class where is opened for can be sure is called or is problem with your uiscript (some keys failed) and can't show and not all time show something on syserr. root/uiSystem.py (replace the function OpenDialog) with this: def OpenDialog(self): import chat chat.AppendChat(chat.CHAT_TYPE_INFO, "uiSystem.SystemDialog().OpenDialog()") self.Show() If he show you message and not appear the window that means you have problem in ../SystemDialog.py (uiscript or locale) You can try also with: #self.Show() ui.ScriptWindow.Show(self) Link to comment Share on other sites More sharing options...
Suky 1 Posted May 24, 2017 Author Share Posted May 24, 2017 6 minutes ago, Tasho said: Then go and make a dbg on class where is opened for can be sure is called or is problem with your uiscript (some keys failed) and can't show and not all time show something on syserr. root/uiSystem.py (replace the function OpenDialog) with this: def OpenDialog(self): import chat chat.AppendChat(chat.CHAT_TYPE_INFO, "uiSystem.SystemDialog().OpenDialog()") self.Show() If he show you message and not appear the window that means you have problem in ../SystemDialog.py (uiscript or locale) You can try also with: #self.Show() ui.ScriptWindow.Show(self) Binary cant call OnPressEscapeKey ^^ I Press button system open system menu. And not append chat ^^ Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19674 Posted May 24, 2017 Honorable Member Share Posted May 24, 2017 It could be a wrong coded python file also. 1 Link to comment Share on other sites More sharing options...
Suky 1 Posted May 24, 2017 Author Share Posted May 24, 2017 2 minutes ago, xP3NG3Rx said: It could be a wrong coded python file also. I Can send you my root . You have a time for me ^^ ? Link to comment Share on other sites More sharing options...
Suky 1 Posted May 25, 2017 Author Share Posted May 25, 2017 solved close please Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now