Jump to content

Recommended Posts

Hello devs , 

i was working on my system and i made a gui the problem is the close button doesn't work..
tried SetCloseEvent it's just doesn't disapper

my coding

 

import ui
import chat
import app
import player
import snd
import game
import item
import net
import constInfo
import locale
import chrmgr
import uiWhisper
import interfacemodule
import time
import wndMgr

class DailyEventlog(ui.ScriptWindow):

	def __init__(self):
		ui.ScriptWindow.__init__(self)
		self.__Load()
		constInfo.dailygui = 1
		
	def __del__(self):
		ui.ScriptWindow.__del__(self)
		constInfo.dailygui = 0
		self.Hide()
		return TRUE
	
	def Destroy(self):
		self.Hide()
		constInfo.dailygui = 1
		return TRUE
	
	def __Load_LoadScript(self, fileName):
		try:
			pyScriptLoader = ui.PythonScriptLoader()
			pyScriptLoader.LoadScriptFile(self, fileName)
		except:
			import exception
			exception.Abort("failed to LoadScript")
	
	def __Load(self):
		self.__Load_LoadScript("uiscript/dmboard.py")
		
		try: 
			GetObject=self.GetChild
			self.titleBar = GetObject("titlebar")
		except:
			import exception
			exception.Abort("failed to load titlebar")
	
		self.titleBar.SetCloseEvent(self.Destroy())
		width = wndMgr.GetScreenWidth()
		height = wndMgr.GetScreenHeight()
	
		
		
		

 

Link to comment
https://metin2.dev/topic/14715-close-button/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

thx guy fixed :

 

	def __Load(self):
		self.__Load_LoadScript("uiscript/dmboard.py")
		
		try: 
			GetObject=self.GetChild
			self.titleBar = GetObject("titlebar")
		except:
			import exception
			exception.Abort("failed to load titlebar")
	
		self.titleBar.SetCloseEvent(self.Hide)

close request

Link to comment
https://metin2.dev/topic/14715-close-button/#findComment-83217
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.