bencemal 1
bencemal
mavzermete 1
mavzermete
farkmt2official 1
farkmt2official
Bvural41 1
Bvural41
Fethi Polat 1
Fethi Polat
Mt2Hizmet 1
Mt2Hizmet
Scarlet 1
Scarlet
Hikaye Ekle

[PYTHON] HIZLI OYUN SONU SİSTEMİ

  • Konuyu başlatan Konuyu başlatan [DEV]AB
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 5
  • Görüntüleme Görüntüleme 5K
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!

Z9RYBG.png

5DzYlR.png

root / uisystem.py açılır importlara eklenir.

Kod:
import uiCommon

aratılır.

Kod:
def __ClickExitButton(self):

kod bloğu tamamen değiştirilir.

Kod:
 def __ClickExitButton(self):
self.Close()
questionDialog = uiCommon.QuestionDialogHizliCikis()
# questionDialog.SetText2(localeInfo.HIZLI_CIKIS_BILGILENDIRME)
questionDialog.SetText("Oyunu kapatmak istiyor musun?")
questionDialog.SetAcceptEvent(ui.__mem_func__(self.__EvetKapat))
questionDialog.SetCancelEvent(ui.__mem_func__(self.__HayirKapatma))
questionDialog.Open()
self.questionDialog = questionDialog

def __EvetKapat(self):
app.Exit()

def __HayirKapatma(self):
self.questionDialog.Close()

root / uicommon.py açılır. ve aratılır

Kod:
class QuestionDialogItem(ui.ScriptWindow):

Kod bloğunun altına bu blok eklenir.

Kod:
class QuestionDialogHizliCikis(ui.ScriptWindow):

def __init__(self):
ui.ScriptWindow.__init__(self)
self.__CreateDialog()

def __del__(self):
ui.ScriptWindow.__del__(self)

def __CreateDialog(self):
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "uiscript/questiondialog_hizlicikis.py")

self.board = self.GetChild("board")
# self.textLine2 = self.GetChild("message_duello")
self.textLine = self.GetChild("message")
self.acceptButton = self.GetChild("accept")
self.cancelButton = self.GetChild("cancel")

def Open(self):
self.SetCenterPosition()
self.SetTop()
self.Show()

def Close(self):
self.Hide()

def SetWidth(self, width):
height = self.GetHeight()
self.SetSize(width, height)
self.board.SetSize(width, height)
self.SetCenterPosition()
self.UpdateRect()

def SAFE_SetAcceptEvent(self, event):
self.acceptButton.SAFE_SetEvent(event)

def SAFE_SetCancelEvent(self, event):
self.cancelButton.SAFE_SetEvent(event)

def SetAcceptEvent(self, event):
self.acceptButton.SetEvent(event)

def SetCancelEvent(self, event):
self.cancelButton.SetEvent(event)

def SetText(self, text):
self.textLine.SetText(text)

# def SetText2(self, text):
# self.textLine2.SetText(text)

def SetAcceptText(self, text):
self.acceptButton.SetText(text)

def SetCancelText(self, text):
self.cancelButton.SetText(text)

def OnPressEscapeKey(self):
self.Close()
return TRUE

locale_tr / locale_interface.txt açılır ve aratılır

Kod:
SYSTEM_EXIT Oyun Sonu

değiştirilir.

Kod:
SYSTEM_EXIT Hızlı Oyun Sonu



Son olarak vereceğim indirme linkindeki dosya uiscript'in içine atılır !

LİNK:

VT:
 
Moderatör tarafında düzenlendi:
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst