- # dracaryS
- import aralarına ekle
- from _weakref import proxy
- import os
- arat
- self.tilingMode = 0
- altına yapıştır
- self.langInt=0
- arat
- self.titleBar = GetObject("titlebar")
- altına yapistir
- self.board = GetObject("board")
- arat
- if musicInfo.fieldMusic==musicInfo.METIN2THEMA:
- self.selectMusicFile.SetText(uiSelectMusic.DEFAULT_THEMA)
- else:
- self.selectMusicFile.SetText(musicInfo.fieldMusic[:MUSIC_FILENAME_MAX_LEN])
- altına yapistir
- self.langInfo = {
- 1: localeInfo.TURKISH,
- 2: localeInfo.ENGLISH,
- }
- self.lang = ui.ComboBoxImage(self.board,"img.png",30,251+25)
- self.lang.SetCurrentItem(self.langInfo[1])
- self.lang.SetParent(self.board)
- for index, data in self.langInfo.iteritems():
- self.lang.InsertItem(index, data)
- self.lang.SetEvent(lambda x, point=proxy(self): point.__ClickLanguage(x))
- self.lang.Show()
- def __ClickLanguage(self,lang):
- self.langInt = lang
- self.lang.SetCurrentItem(self.langInfo[lang])
- self.lang.CloseListBox()
- # Uygula butonu modulu
- def __ChangeLanguage(self):
- if self.langInt == 1: # tr
- if "locale/tr" != app.GetLocalePath():
- file = open("locale.cfg", "w")
- file.write("10022 1254 tr")
- file.close()
- os.system('start metin2.exe')
- app.Exit()
- elif self.langInt == 2: # en
- if "locale/en" != app.GetLocalePath():
- file = open("locale.cfg", "w")
- file.write("10022 1250 en")
- file.close()
- os.system('start metin2.exe')
- app.Exit()