HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!
interfacemodule.py dosyasına sadece gmlerin görebileceği bir buton eklemek istiyorum. Bu şekilde bir yapı oluşturdum fakat buton bu şekildeyken ekranda görünmüyor. Fakat diğer koddaki gibi herhangi bir kontrol eklemediğimde buton görünüyor. Bunu nasıl ayarlayabilirim ?
[CODE lang="python" title="GM KONTROLLÜ KOD"]
if chr.IsGameMaster(player.GetMainCharacterIndex()):
if not self.wndyenibutton:
wndyenibutton = ui.Button()
wndyenibutton.SetUpVisual("yenibutton.tga")
wndyenibutton.SetOverVisual("yenibutton.tga")
wndyenibutton.SetDownVisual("yenibutton.tga")
wndyenibutton.SetPosition(125, wndMgr.GetScreenHeight() - 100)
wndyenibutton.SetEvent(ui.__mem_func__(self.yenibutton))
wndyenibutton.Show()
self.wndyenibutton = wndyenibutton
else:
if self.wndyenibutton:
self.wndyenibutton.Hide()
self.wndyenibutton = None
[/CODE]
[CODE lang="python" title="HERKESE AÇIK BUTON"]
wndyenibutton = ui.Button()
wndyenibutton.SetUpVisual("yenibutton.tga")
wndyenibutton.SetOverVisual("yenibutton.tga")
wndyenibutton.SetDownVisual("yenibutton.tga")
wndyenibutton.SetPosition(125, wndMgr.GetScreenHeight() - 100)
wndyenibutton.SetEvent(ui.__mem_func__(self.yenibutton))
wndyenibutton.Show()
self.wndyenibutton = wndyenibutton
[/CODE]
[CODE lang="python" title="GM KONTROLLÜ KOD"]
if chr.IsGameMaster(player.GetMainCharacterIndex()):
if not self.wndyenibutton:
wndyenibutton = ui.Button()
wndyenibutton.SetUpVisual("yenibutton.tga")
wndyenibutton.SetOverVisual("yenibutton.tga")
wndyenibutton.SetDownVisual("yenibutton.tga")
wndyenibutton.SetPosition(125, wndMgr.GetScreenHeight() - 100)
wndyenibutton.SetEvent(ui.__mem_func__(self.yenibutton))
wndyenibutton.Show()
self.wndyenibutton = wndyenibutton
else:
if self.wndyenibutton:
self.wndyenibutton.Hide()
self.wndyenibutton = None
[/CODE]
[CODE lang="python" title="HERKESE AÇIK BUTON"]
wndyenibutton = ui.Button()
wndyenibutton.SetUpVisual("yenibutton.tga")
wndyenibutton.SetOverVisual("yenibutton.tga")
wndyenibutton.SetDownVisual("yenibutton.tga")
wndyenibutton.SetPosition(125, wndMgr.GetScreenHeight() - 100)
wndyenibutton.SetEvent(ui.__mem_func__(self.yenibutton))
wndyenibutton.Show()
self.wndyenibutton = wndyenibutton
[/CODE]
