Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 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]