Soru Envanter yanı yan menü uyarlama?

Herhangi bir konuda danışmak istediğiniz soru varsa bu öneki seçebilirsiniz.

texas1343

MT Üye
MT Üye
Mesaj
403
Çözümler
21
Beğeni
114
Puan
499
Ticaret Puanı
0
hayırlı aksamlar envanter yanı yan menu ayarlamalar yapıyorum fakat 4 adet uyarlamayı beceremedim Offlinshop,Oto bağırma.Boss takip ve rank sismleri bunları yan menüye nasıl uyarlama yapabilrim?

a:
Genişlet Daralt Kopyala
class MenuWindow(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.uisaplingswitchbot = None
        self.wndInventory = wndInventory;


        self.__LoadWindow()

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

    def Show(self):
        self.__LoadWindow()

        ui.ScriptWindow.Show(self)
        self.EkraniAc()


    def Close(self):
        self.Hide()
        
    def EkraniAc(self):
        self.menuekran.Show()

        self.AdjustPositionAndSize()
        

    def GetBasePosition(self):
        x, y = self.wndInventory.GetGlobalPosition()
        # return x - 58, y + 544-160
        return x - 45, y + 0

    def AdjustPositionAndSize(self):
        bx, by = self.GetBasePosition()


        self.SetPosition(bx, by)
        self.SetSize(self.ORIGINAL_WIDTH, self.GetHeight())

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

        self.isLoaded = 1

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

        try:
            wndEquip = self.GetChild("CostumeSlot")
            self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
            
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.BindObject")

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

        self.wndEquip = wndEquip

    def RefreshCostumeSlot(self):
        getItemVNum=player.GetItemIndex
        
        for i in xrange(item.COSTUME_SLOT_COUNT):
            slotNumber = item.COSTUME_SLOT_START + i
            self.wndEquip.SetItemSlot(slotNumber, getItemVNum(slotNumber), 0)

        self.wndEquip.RefreshSlot()

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

        self.isLoaded = 1

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

        try:
            self.ORIGINAL_WIDTH = self.GetWidth()
            self.menuekran = self.GetChild("menuboard")

            self.depo = self.GetChild("DepoButton")
            self.efsun = self.GetChild("Efsun")
            self.npc = self.GetChild("npc")
            self.biyolog = self.GetChild("Biyolog")
            self.bpass = self.GetChild("bpass")
            self.toplu = self.GetChild("toplu")

        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.BindObject")
            
##D?KKAT ET BURAYA
        self.depo.SetEvent(ui.__mem_func__(self.depobutton))
        self.efsun.SetEvent(ui.__mem_func__(self.efsunbutton))
        self.npc.SetEvent(ui.__mem_func__(self.npcac))
        self.biyolog.SetEvent(ui.__mem_func__(self.biyoac))
        self.bpass.SetEvent(ui.__mem_func__(self.battlepass))
        self.toplu.SetEvent(ui.__mem_func__(self.topluislem))


    def battlepass(self):
        net.SendChatPacket("/open_battlepass")
        
    def topluislem(self):
        self.wndInventory.interface.OpenDeleteItem()
        
    def npcac(self):   
        self.wndInventory.NPCAC()
        
    def biyoac(self):   
        self.wndInventory.BiyoEkran()
        
    def efsunbutton(self):
        self.wndInventory.EfsunAc()
        
    def depobutton(self):
        net.SendChatPacket("/click_safebox")
 
Geri
Üst