- Katılım
- 26 Tem 2023
- Konular
- 451
- Mesajlar
- 6,327
- Çözüm
- 28
- Online süresi
- 2mo 26d
- Reaksiyon Skoru
- 3,414
- Altın Konu
- 133
- Başarım Puanı
- 249
- MmoLira
- 37,469
- DevLira
- 12
ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!
Daha önce paylaşıldıysa raporlanabilir
Eğer ui.py dosyasında CheckBox yoksa aşağıdakileri ekleyin yoksa hata alırsınız.(etc.rar dakileride ekleyin)
Eğer ui.py dosyasında CheckBox yoksa aşağıdakileri ekleyin yoksa hata alırsınız.(etc.rar dakileride ekleyin)
#Arat;
class Button(Window):
#Üstüne ekle;
class CheckBox(Window):
def __init__(self):
Window.__init__(self)
self.backgroundImage = None
self.checkImage = None
self.eventFunc = { "ON_CHECK" : None, "ON_UNCKECK" : None, }
self.eventArgs = { "ON_CHECK" : None, "ON_UNCKECK" : None, }
self.CreateElements()
def __del__(self):
Window.__del__(self)
self.backgroundImage = None
self.checkImage = None
self.eventFunc = { "ON_CHECK" : None, "ON_UNCKECK" : None, }
self.eventArgs = { "ON_CHECK" : None, "ON_UNCKECK" : None, }
def CreateElements(self):
self.backgroundImage = ImageBox()
self.backgroundImage.SetParent(self)
self.backgroundImage.AddFlag("not_pick")
self.backgroundImage.SetPosition(0, -2)
self.backgroundImage.LoadImage("d:/ymir work/ui/game/checkbox/checkbox.tga")
self.backgroundImage.Show()
self.checkImage = ImageBox()
self.checkImage.SetParent(self)
self.checkImage.AddFlag("not_pick")
self.checkImage.SetPosition(0, -2)
self.checkImage.LoadImage("d:/ymir work/ui/game/checkbox/checked.tga")
self.checkImage.Hide()
self.textInfo = TextLine()
self.textInfo.SetParent(self)
self.textInfo.SetPosition(20, -2)
self.textInfo.Show()
self.SetSize(self.backgroundImage.GetWidth() + self.textInfo.GetTextSize()[0], self.backgroundImage.GetHeight() + self.textInfo.GetTextSize()[1])
def SetTextInfo(self, info):
if self.textInfo:
self.textInfo.SetText(info)
self.SetSize(self.backgroundImage.GetWidth() + self.textInfo.GetTextSize()[0], self.backgroundImage.GetHeight() + self.textInfo.GetTextSize()[1])
def SetCheckStatus(self, flag):
if flag:
self.checkImage.Show()
else:
self.checkImage.Hide()
def GetCheckStatus(self):
if self.checkImage:
return self.checkImage.IsShow()
return False
def SetEvent(self, func, *args) :
result = self.eventFunc.has_key(args[0])
if result :
self.eventFunc[args[0]] = func
self.eventArgs[args[0]] = args
else :
print "[ERROR] ui.py SetEvent, Can`t Find has_key : %s" % args[0]
def OnMouseLeftButtonUp(self):
if self.checkImage:
if self.checkImage.IsShow():
self.checkImage.Hide()
if self.eventFunc["ON_UNCKECK"]:
apply(self.eventFunc["ON_UNCKECK"], self.eventArgs["ON_UNCKECK"])
else:
self.checkImage.Show()
if self.eventFunc["ON_CHECK"]:
apply(self.eventFunc["ON_CHECK"], self.eventArgs["ON_CHECK"])
#Arat;
elif Type == "listboxex":
parent.Children[Index] = ListBoxEx()
parent.Children[Index].SetParent(parent)
self.LoadElementListBoxEx(parent.Children[Index], ElementValue, parent)
#Altına ekle;
elif Type == "checkbox":
parent.Children[Index] = CheckBox()
parent.Children[Index].SetParent(parent)
self.LoadElementCheckBox(parent.Children[Index], ElementValue, parent)
#Arat;
def LoadElementListBoxEx(self, window, value, parentWindow):
#Üstüne ekle;
def LoadElementCheckBox(self, window, value, parentWindow):
if value.has_key("text"):
window.SetText(value["text"])
if value.has_key("checked") and value["checked"] == True:
window.SetCheckStatus(window.STATE_SELECTED)
if value.has_key("disabled") and value["disabled"] == True:
window.Disable()
self.LoadDefaultData(window, value, parentWindow)
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
Ekli dosyalar
- Katılım
- 17 Ara 2023
- Konular
- 258
- Mesajlar
- 1,502
- Çözüm
- 18
- Online süresi
- 3mo 14d
- Reaksiyon Skoru
- 1,047
- Altın Konu
- 15
- Başarım Puanı
- 224
- MmoLira
- 7,803
- DevLira
- 15
paylaşım için teşekkürler
- Katılım
- 9 Kas 2021
- Konular
- 0
- Mesajlar
- 29
- Online süresi
- 5d 19h
- Reaksiyon Skoru
- 25
- Altın Konu
- 0
- TM Yaşı
- 4 Yıl 7 Ay
- Başarım Puanı
- 42
- MmoLira
- 1,887
- DevLira
- 0
paylaşım için teşekkürler
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 54
- Görüntüleme
- 7K
- Cevaplar
- 13
- Görüntüleme
- 1K
- Cevaplar
- 42
- Görüntüleme
- 4K










