Çözüldü Envanter

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ı.

suleyman06

Bla bla
MT Üye
Mesaj
309
Çözümler
7
Beğeni
93
Puan
724
Ticaret Puanı
0
Ekran Alıntısı2.PNG


Arkadaşlar envanterin yanındaki pencereyi nasıl kaldırabilirim acaba
 
Çözüm
Root > uiinventory.py Aç Ve alttaki kodları sil::
class BeltInventoryWindow(ui.ScriptWindow):

    def __init__(self, wndInventory):
        import exception
   
        if not app.ENABLE_NEW_EQUIPMENT_SYSTEM:        
            exception.Abort("What do you do?")
            return

        if not wndInventory:
            exception.Abort("wndInventory parameter must be set to InventoryWindow")
            return                    
             
        ui.ScriptWindow.__init__(self)

        self.isLoaded = 0
        self.wndInventory = wndInventory;
   
        self.wndBeltInventoryLayer = None
        self.wndBeltInventorySlot = None
        self.expandBtn = None
        self.minBtn = None

        self.__LoadWindow()

    def __del__(self)...
Root > uiinventory.py Aç Ve alttaki kodları sil::
class BeltInventoryWindow(ui.ScriptWindow):

    def __init__(self, wndInventory):
        import exception
   
        if not app.ENABLE_NEW_EQUIPMENT_SYSTEM:        
            exception.Abort("What do you do?")
            return

        if not wndInventory:
            exception.Abort("wndInventory parameter must be set to InventoryWindow")
            return                    
             
        ui.ScriptWindow.__init__(self)

        self.isLoaded = 0
        self.wndInventory = wndInventory;
   
        self.wndBeltInventoryLayer = None
        self.wndBeltInventorySlot = None
        self.expandBtn = None
        self.minBtn = None

        self.__LoadWindow()

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

    def Show(self, openBeltSlot = False):
        self.__LoadWindow()
        self.RefreshSlot()

        ui.ScriptWindow.Show(self)
   
        if openBeltSlot:
            self.OpenInventory()
        else:
            self.CloseInventory()

    def Close(self):
        self.Hide()

    def IsOpeningInventory(self):
        return self.wndBeltInventoryLayer.IsShow()
   
    def OpenInventory(self):
        self.wndBeltInventoryLayer.Show()
        self.expandBtn.Hide()

        if localeInfo.IsARABIC() == 0:
            self.AdjustPositionAndSize()
           
    def CloseInventory(self):
        self.wndBeltInventoryLayer.Hide()
        self.expandBtn.Show()
   
        if localeInfo.IsARABIC() == 0:
            self.AdjustPositionAndSize()

    ## ÇöÀç Àκ¥Å丮 À§Ä¡¸¦ ±âÁØÀ¸·Î BASE À§Ä¡¸¦ °è»ê, ¸®ÅÏ.. ¼ıÀÚ ÇϵåÄÚµùÇϱâ Á¤¸» ½ÈÁö¸¸ ¹æ¹ıÀÌ ¾ø´Ù..
    def GetBasePosition(self):
        x, y = self.wndInventory.GetGlobalPosition()
        return x - 148, y + 241
   
    def AdjustPositionAndSize(self):
        bx, by = self.GetBasePosition()
   
        if self.IsOpeningInventory():        
            self.SetPosition(bx, by)
            self.SetSize(self.ORIGINAL_WIDTH, self.GetHeight())
       
        else:
            self.SetPosition(bx + 138, by);
            self.SetSize(10, self.GetHeight())

    def __LoadWindow(self):
        if self.isLoaded == 1:
            return

        self.isLoaded = 1

        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/BeltInventoryWindow.py")
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.LoadObject")

        try:
            self.ORIGINAL_WIDTH = self.GetWidth()
            wndBeltInventorySlot = self.GetChild("BeltInventorySlot")
            self.wndBeltInventoryLayer = self.GetChild("BeltInventoryLayer")
            self.expandBtn = self.GetChild("ExpandBtn")
            self.minBtn = self.GetChild("MinimizeBtn")
       
            self.expandBtn.SetEvent(ui.__mem_func__(self.OpenInventory))
            self.minBtn.SetEvent(ui.__mem_func__(self.CloseInventory))
       
            if localeInfo.IsARABIC() :
                self.expandBtn.SetPosition(self.expandBtn.GetWidth() - 2, 15)
                self.wndBeltInventoryLayer.SetPosition(self.wndBeltInventoryLayer.GetWidth() - 5, 0)
                self.minBtn.SetPosition(self.minBtn.GetWidth() + 3, 15)        
 
            for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
                slotNumber = item.BELT_INVENTORY_SLOT_START + i                        
                wndBeltInventorySlot.SetCoverButton(slotNumber,    "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False)                                
       
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.BindObject")

        ## Equipment
        wndBeltInventorySlot.SetOverInItemEvent(ui.__mem_func__(self.wndInventory.OverInItem))
        wndBeltInventorySlot.SetOverOutItemEvent(ui.__mem_func__(self.wndInventory.OverOutItem))
        wndBeltInventorySlot.SetUnselectItemSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))
        wndBeltInventorySlot.SetUseSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))                    
        wndBeltInventorySlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.wndInventory.SelectEmptySlot))
        wndBeltInventorySlot.SetSelectItemSlotEvent(ui.__mem_func__(self.wndInventory.SelectItemSlot))

        self.wndBeltInventorySlot = wndBeltInventorySlot

    def RefreshSlot(self):
        getItemVNum=player.GetItemIndex
   
        for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
            slotNumber = item.BELT_INVENTORY_SLOT_START + i
            self.wndBeltInventorySlot.SetItemSlot(slotNumber, getItemVNum(slotNumber), player.GetItemCount(slotNumber))
            self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, True)
       
            avail = "0"
       
            if player.IsAvailableBeltInventoryCell(slotNumber):
                self.wndBeltInventorySlot.EnableCoverButton(slotNumber)            
            else:
                self.wndBeltInventorySlot.DisableCoverButton(slotNumber)            

        self.wndBeltInventorySlot.RefreshSlot()

Bunuda sil :::
            if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
                self.wndBelt = BeltInventoryWindow(self)

bunu da Sil :::
        if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
            for i in xrange(player.NEW_EQUIPMENT_SLOT_COUNT):
                slotNumber = player.NEW_EQUIPMENT_SLOT_START + i
                itemCount = getItemCount(slotNumber)
                if itemCount <= 1:
                    itemCount = 0
                setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount)
                print "ENABLE_NEW_EQUIPMENT_SYSTEM", slotNumber, itemCount, getItemVNum(slotNumber)

Son olarak uiscript dosyasından BeltInventoryWindow.py Dosyasını sil ve paketle oyuna atıp dene bir bakalım
 
Çözüm
Root > uiinventory.py Aç Ve alttaki kodları sil::
class BeltInventoryWindow(ui.ScriptWindow):

    def __init__(self, wndInventory):
        import exception
  
        if not app.ENABLE_NEW_EQUIPMENT_SYSTEM:       
            exception.Abort("What do you do?")
            return

        if not wndInventory:
            exception.Abort("wndInventory parameter must be set to InventoryWindow")
            return                   
            
        ui.ScriptWindow.__init__(self)

        self.isLoaded = 0
        self.wndInventory = wndInventory;
  
        self.wndBeltInventoryLayer = None
        self.wndBeltInventorySlot = None
        self.expandBtn = None
        self.minBtn = None

        self.__LoadWindow()

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

    def Show(self, openBeltSlot = False):
        self.__LoadWindow()
        self.RefreshSlot()

        ui.ScriptWindow.Show(self)
  
        if openBeltSlot:
            self.OpenInventory()
        else:
            self.CloseInventory()

    def Close(self):
        self.Hide()

    def IsOpeningInventory(self):
        return self.wndBeltInventoryLayer.IsShow()
  
    def OpenInventory(self):
        self.wndBeltInventoryLayer.Show()
        self.expandBtn.Hide()

        if localeInfo.IsARABIC() == 0:
            self.AdjustPositionAndSize()
          
    def CloseInventory(self):
        self.wndBeltInventoryLayer.Hide()
        self.expandBtn.Show()
  
        if localeInfo.IsARABIC() == 0:
            self.AdjustPositionAndSize()

    ## ÇöÀç Àκ¥Å丮 À§Ä¡¸¦ ±âÁØÀ¸·Î BASE À§Ä¡¸¦ °è»ê, ¸®ÅÏ.. ¼ıÀÚ ÇϵåÄÚµùÇϱâ Á¤¸» ½ÈÁö¸¸ ¹æ¹ıÀÌ ¾ø´Ù..
    def GetBasePosition(self):
        x, y = self.wndInventory.GetGlobalPosition()
        return x - 148, y + 241
  
    def AdjustPositionAndSize(self):
        bx, by = self.GetBasePosition()
  
        if self.IsOpeningInventory():       
            self.SetPosition(bx, by)
            self.SetSize(self.ORIGINAL_WIDTH, self.GetHeight())
      
        else:
            self.SetPosition(bx + 138, by);
            self.SetSize(10, self.GetHeight())

    def __LoadWindow(self):
        if self.isLoaded == 1:
            return

        self.isLoaded = 1

        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/BeltInventoryWindow.py")
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.LoadObject")

        try:
            self.ORIGINAL_WIDTH = self.GetWidth()
            wndBeltInventorySlot = self.GetChild("BeltInventorySlot")
            self.wndBeltInventoryLayer = self.GetChild("BeltInventoryLayer")
            self.expandBtn = self.GetChild("ExpandBtn")
            self.minBtn = self.GetChild("MinimizeBtn")
      
            self.expandBtn.SetEvent(ui.__mem_func__(self.OpenInventory))
            self.minBtn.SetEvent(ui.__mem_func__(self.CloseInventory))
      
            if localeInfo.IsARABIC() :
                self.expandBtn.SetPosition(self.expandBtn.GetWidth() - 2, 15)
                self.wndBeltInventoryLayer.SetPosition(self.wndBeltInventoryLayer.GetWidth() - 5, 0)
                self.minBtn.SetPosition(self.minBtn.GetWidth() + 3, 15)       
 
            for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
                slotNumber = item.BELT_INVENTORY_SLOT_START + i                       
                wndBeltInventorySlot.SetCoverButton(slotNumber,    "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False)                               
      
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.BindObject")

        ## Equipment
        wndBeltInventorySlot.SetOverInItemEvent(ui.__mem_func__(self.wndInventory.OverInItem))
        wndBeltInventorySlot.SetOverOutItemEvent(ui.__mem_func__(self.wndInventory.OverOutItem))
        wndBeltInventorySlot.SetUnselectItemSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))
        wndBeltInventorySlot.SetUseSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))                   
        wndBeltInventorySlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.wndInventory.SelectEmptySlot))
        wndBeltInventorySlot.SetSelectItemSlotEvent(ui.__mem_func__(self.wndInventory.SelectItemSlot))

        self.wndBeltInventorySlot = wndBeltInventorySlot

    def RefreshSlot(self):
        getItemVNum=player.GetItemIndex
  
        for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
            slotNumber = item.BELT_INVENTORY_SLOT_START + i
            self.wndBeltInventorySlot.SetItemSlot(slotNumber, getItemVNum(slotNumber), player.GetItemCount(slotNumber))
            self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, True)
      
            avail = "0"
      
            if player.IsAvailableBeltInventoryCell(slotNumber):
                self.wndBeltInventorySlot.EnableCoverButton(slotNumber)           
            else:
                self.wndBeltInventorySlot.DisableCoverButton(slotNumber)           

        self.wndBeltInventorySlot.RefreshSlot()

Bunuda sil :::
            if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
                self.wndBelt = BeltInventoryWindow(self)

bunu da Sil :::
        if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
            for i in xrange(player.NEW_EQUIPMENT_SLOT_COUNT):
                slotNumber = player.NEW_EQUIPMENT_SLOT_START + i
                itemCount = getItemCount(slotNumber)
                if itemCount <= 1:
                    itemCount = 0
                setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount)
                print "ENABLE_NEW_EQUIPMENT_SYSTEM", slotNumber, itemCount, getItemVNum(slotNumber)

Son olarak uiscript dosyasından BeltInventoryWindow.py Dosyasını sil ve paketle oyuna atıp dene bir bakalım
direkt image silse kalkar galiba neden bu kadar uzun anlattın ki :/
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst