Çözüldü + Basma Ekranı Gelmiyor

Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

miranyabilisim

Üye
Üye
Mesaj
27
Çözümler
3
Beğeni
5
Puan
433
Ticaret Puanı
0
Kusura bakmayın acemi olunca yardım talebim çok oluyor :) Aradım ancak sorunun çözümünü bulamadım.
-Demircide olsun yada nesnelerle olsun + basma ekranı gelmiyor.
-İteme taş basma ekranı geliyor ancak taş basma işlemini gerçekleştirmiyor.

 
Çözüm
CheckBoxRefine
bu ui.py nizde eksik sanırım ve + basma pencerenizde sanırım pencere açık kalsın seçeneği mevcut ui.py nizde bu fonksiyonu yada modülü bulamadığı için ekranı açmıyor

bu verdiğim kodları ui.py nizde uygun yere ekleyip deneyin

ui.py:
Genişlet Daralt Kopyala
class CheckBoxRefine(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 = {...
syserr.txt içeriğini buraya paylaşırmısınız
 
syser düsmüstür buraya paylasır mısın syseri
ch1 dek, syserr
Python:
Genişlet Daralt Kopyala
: Nov 28 15:35:31 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 1, 960789, 272397, 5, 'GM_LOGIN', '', '192.168.1.127') errno: 1017)
SYSERR: Nov 28 15:35:31 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 1, 960789, 272397, 0, 'LOGIN', '192.168.1.127 1999999634 1 41 162051', '192.168.1.127') errno: 1017)
SYSERR: Nov 28 15:35:31 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'loginlog2' (errno: 2 - No such file or directory) (query: INSERT INTO loginlog2(type, is_gm, login_time, channel, account_id, pid, ip, client_version) VALUES('INVALID', 'Y', NOW(), 1, 1, 1, inet_aton('192.168.1.127'), '') errno: 1017)
SYSERR: Nov 28 15:35:31 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 0, 0, 10001465, 'SET_SOCKET', '', '', 39036) errno: 1017)
SYSERR: Nov 28 15:35:56 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'loginlog2' (errno: 2 - No such file or directory) (query: SET @i = (SELECT MAX(id) FROM loginlog2 WHERE account_id=1 AND pid=1) errno: 1017)
SYSERR: Nov 28 15:35:56 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'loginlog2' (errno: 2 - No such file or directory) (query: UPDATE loginlog2 SET type='VALID', logout_time=NOW(), playtime=TIMEDIFF(logout_time,login_time) WHERE id=@i errno: 1017)
SYSERR: Nov 28 15:35:57 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 1, 960905, 272637, 0, 'LOGOUT', '', '192.168.1.127') errno: 1017)
SYSERR: Nov 28 15:35:57 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 17, 0, 10001465, 'SET_SOCKET', '', '', 39036) errno: 1017)
SYSERR: Nov 28 15:36:58 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 35, 959129, 269637, 0, 'LOGIN', '192.168.1.127 79667 1 41 19996', '192.168.1.127') errno: 1017)
SYSERR: Nov 28 15:36:58 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'loginlog2' (errno: 2 - No such file or directory) (query: INSERT INTO loginlog2(type, is_gm, login_time, channel, account_id, pid, ip, client_version) VALUES('INVALID', 'N', NOW(), 1, 3, 35, inet_aton('192.168.1.127'), '') errno: 1017)
SYSERR: Nov 28 15:36:58 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 0, 0, 10001523, 'SET_SOCKET', '', '', 72018) errno: 1017)
SYSERR: Nov 28 15:36:58 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 0, 0, 10001505, 'SET_SOCKET', '', '', 39036) errno: 1017)
SYSERR: Nov 28 15:37:15 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 2, 1703, 0, 10001505, 'SET_SOCKET', '', '', 39036) errno: 1017)
SYSERR: Nov 28 15:37:19 :: Click: CQuestManager::Click(pid=35, target_npc_name=Olay Yardımcısı) - NOT EXIST NPC RACE VNUM[9004]

client dosyasında ki sysrr

Python:
Genişlet Daralt Kopyala
1128 12:38:22049 ::   File "game.py", line 737, in OpenRefineDialog

1128 12:38:22049 ::   File "interfaceModule.py", line 807, in OpenRefineDialog

1128 12:38:22049 ::   File "uiRefine.py", line 306, in Open

1128 12:38:22050 ::   File "uiRefine.py", line 257, in __LoadScript

1128 12:38:22050 :: AttributeError
1128 12:38:22050 :: :
1128 12:38:22051 :: 'module' object has no attribute 'CheckBoxRefine'
1128 12:38:22051 ::

1128 12:39:35375 :: granny_shared_vbs:
1128 12:39:35375 ::     0: 40
1128 12:39:35375 ::     1: 20
1128 12:39:35375 ::     2: 20
1128 12:39:35376 ::     3: 40
1128 12:39:35376 ::     4: 0
1128 12:39:35376 ::     5: 20
1128 12:39:35376 ::     6: 1
1128 12:39:35376 ::     7: 0
1128 12:39:35377 ::     8: 0
 
ch1 dek, syserr
Python:
Genişlet Daralt Kopyala
: Nov 28 15:35:31 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 1, 960789, 272397, 5, 'GM_LOGIN', '', '192.168.1.127') errno: 1017)
SYSERR: Nov 28 15:35:31 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 1, 960789, 272397, 0, 'LOGIN', '192.168.1.127 1999999634 1 41 162051', '192.168.1.127') errno: 1017)
SYSERR: Nov 28 15:35:31 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'loginlog2' (errno: 2 - No such file or directory) (query: INSERT INTO loginlog2(type, is_gm, login_time, channel, account_id, pid, ip, client_version) VALUES('INVALID', 'Y', NOW(), 1, 1, 1, inet_aton('192.168.1.127'), '') errno: 1017)
SYSERR: Nov 28 15:35:31 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 0, 0, 10001465, 'SET_SOCKET', '', '', 39036) errno: 1017)
SYSERR: Nov 28 15:35:56 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'loginlog2' (errno: 2 - No such file or directory) (query: SET @i = (SELECT MAX(id) FROM loginlog2 WHERE account_id=1 AND pid=1) errno: 1017)
SYSERR: Nov 28 15:35:56 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'loginlog2' (errno: 2 - No such file or directory) (query: UPDATE loginlog2 SET type='VALID', logout_time=NOW(), playtime=TIMEDIFF(logout_time,login_time) WHERE id=@i errno: 1017)
SYSERR: Nov 28 15:35:57 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 1, 960905, 272637, 0, 'LOGOUT', '', '192.168.1.127') errno: 1017)
SYSERR: Nov 28 15:35:57 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 17, 0, 10001465, 'SET_SOCKET', '', '', 39036) errno: 1017)
SYSERR: Nov 28 15:36:58 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 35, 959129, 269637, 0, 'LOGIN', '192.168.1.127 79667 1 41 19996', '192.168.1.127') errno: 1017)
SYSERR: Nov 28 15:36:58 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'loginlog2' (errno: 2 - No such file or directory) (query: INSERT INTO loginlog2(type, is_gm, login_time, channel, account_id, pid, ip, client_version) VALUES('INVALID', 'N', NOW(), 1, 3, 35, inet_aton('192.168.1.127'), '') errno: 1017)
SYSERR: Nov 28 15:36:58 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 0, 0, 10001523, 'SET_SOCKET', '', '', 72018) errno: 1017)
SYSERR: Nov 28 15:36:58 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 0, 0, 10001505, 'SET_SOCKET', '', '', 39036) errno: 1017)
SYSERR: Nov 28 15:37:15 :: ChildLoop: AsyncSQL: query failed: Can't find file: 'log' (errno: 2 - No such file or directory) (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 2, 1703, 0, 10001505, 'SET_SOCKET', '', '', 39036) errno: 1017)
SYSERR: Nov 28 15:37:19 :: Click: CQuestManager::Click(pid=35, target_npc_name=Olay Yardımcısı) - NOT EXIST NPC RACE VNUM[9004]

client dosyasında ki sysrr

Python:
Genişlet Daralt Kopyala
1128 12:38:22049 ::   File "game.py", line 737, in OpenRefineDialog

1128 12:38:22049 ::   File "interfaceModule.py", line 807, in OpenRefineDialog

1128 12:38:22049 ::   File "uiRefine.py", line 306, in Open

1128 12:38:22050 ::   File "uiRefine.py", line 257, in __LoadScript

1128 12:38:22050 :: AttributeError
1128 12:38:22050 :: :
1128 12:38:22051 :: 'module' object has no attribute 'CheckBoxRefine'
1128 12:38:22051 ::

1128 12:39:35375 :: granny_shared_vbs:
1128 12:39:35375 ::     0: 40
1128 12:39:35375 ::     1: 20
1128 12:39:35375 ::     2: 20
1128 12:39:35376 ::     3: 40
1128 12:39:35376 ::     4: 0
1128 12:39:35376 ::     5: 20
1128 12:39:35376 ::     6: 1
1128 12:39:35376 ::     7: 0
1128 12:39:35377 ::     8: 0
CheckBoxRefine bunu uirefine.py de göremedigi icin ekranı acmıyor
 
CheckBoxRefine
bu ui.py nizde eksik sanırım ve + basma pencerenizde sanırım pencere açık kalsın seçeneği mevcut ui.py nizde bu fonksiyonu yada modülü bulamadığı için ekranı açmıyor

bu verdiğim kodları ui.py nizde uygun yere ekleyip deneyin

ui.py:
Genişlet Daralt Kopyala
class CheckBoxRefine(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.LoadImage("d:/ymir work/ui/game/refine/checkbox.tga")
        self.backgroundImage.Show()
       
        self.checkImage = ImageBox()
        self.checkImage.SetParent(self)
        self.checkImage.AddFlag("not_pick")
        self.checkImage.SetPosition(0, -4)
        self.checkImage.LoadImage("d:/ymir work/ui/game/refine/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"])
 
CheckBoxRefine
bu ui.py nizde eksik sanırım ve + basma pencerenizde sanırım pencere açık kalsın seçeneği mevcut ui.py nizde bu fonksiyonu yada modülü bulamadığı için ekranı açmıyor

bu verdiğim kodları ui.py nizde uygun yere ekleyip deneyin

ui.py:
Genişlet Daralt Kopyala
class CheckBoxRefine(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.LoadImage("d:/ymir work/ui/game/refine/checkbox.tga")
        self.backgroundImage.Show()
    
        self.checkImage = ImageBox()
        self.checkImage.SetParent(self)
        self.checkImage.AddFlag("not_pick")
        self.checkImage.SetPosition(0, -4)
        self.checkImage.LoadImage("d:/ymir work/ui/game/refine/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"])

tamamdır hocam yol gösterdiğiniz için teşekkür ederim. Eski dosyalarım arasından kodu buldum ekledim sorun çözüldü. Çok teşekkürler.

Python:
Genişlet Daralt Kopyala
class CheckBoxRefine(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"])
 
Son düzenleme:
Çözüm
tamamdır hocam yol gösterdiğiniz için teşekkür ederim. Eski dosyalarım arasından kodu buldum ekledim sorun çözüldü. Çok teşekkürler.

Python:
Genişlet Daralt Kopyala
class CheckBoxRefine(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"])
çözüm olarak işaretlerseniz sorunu yaşayan başka kişilerde faydalanabilir
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst