Kemer Envanterindeki Tüm iksirleri Etkinleştirme Kodları

Fendrix

𝓣𝓱𝓮 𝓑𝓮𝓼𝓽 𝓞𝓷𝓮
Fahri Üye
Vip Üye
21 Mar 2021
1,314
371
Çevrimiçi zamanı
7d 9h 0m
153
Best answers
0
Oyuncu
Metin2
Görmek İçin Tıklayın.

uiinventory.py:

Kod:
self.wndBeltInventoryLayer = None
        self.wndBeltInventorySlot = None
        self.expandBtn = None
        self.minBtn = None
        ##activateall
        self.UseItemBelt = None
        
            self.expandBtn = self.GetChild("ExpandBtn")
            self.minBtn = self.GetChild("MinimizeBtn")
            ##activateall
            self.UseItemBelt = self.GetChild("UseBeltItemsButton")
            
            self.expandBtn.SetEvent(ui.__mem_func__(self.OpenInventory))
            self.minBtn.SetEvent(ui.__mem_func__(self.CloseInventory))
            ##activateall
            self.UseItemBelt.SetEvent(self.ActivateAll)
            
        self.wndBeltInventorySlot.RefreshSlot()
        
    ##activateall
    def ActivateAll(self):
        for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
            slotNumber = item.BELT_INVENTORY_SLOT_START + i
            net.SendItemUsePacket(slotNumber)

Beltinventorywindow.py:

Kod:
import uiScriptLocale
import item

EQUIPMENT_START_INDEX = 90
BUTTON_ROOT = "d:/ymir work/ui/public/"

window = {
    "name" : "BeltInventoryWindow",

    ## 600 - (width + 오른쪽으로 부터 띄우기 24 px)
    "x" : SCREEN_WIDTH - 176 - 148,
    "y" : SCREEN_HEIGHT - 37 - 565 + 209 + 32,
#    "x" : -148,
#    "y" : 241,
    "width" : 148,
    "height" : 169,

    "type" : "image",
    "image" : "d:/ymir work/ui/game/belt_inventory/bg.tga",
    

    "children" :
    (
        ## Expand Buttons
        {
            "name" : "ExpandBtn",
            "type" : "button",

            "x" : 2,
            "y" : 15,

            "default_image" : "d:/ymir work/ui/game/belt_inventory/btn_expand_normal.tga",
            "over_image" : "d:/ymir work/ui/game/belt_inventory/btn_expand_over.tga",
            "down_image" : "d:/ymir work/ui/game/belt_inventory/btn_expand_down.tga",
            "disable_image" : "d:/ymir work/ui/game/belt_inventory/btn_expand_disabled.tga",
        },

        
        ## Belt Inventory Layer (include minimize button)
        {
            "name" : "BeltInventoryLayer",
#            "type" : "board",
#            "style" : ("attach", "float"),

            "x" : 5,
            "y" : 0,

            "width" : 148,
            "height" : 169,

            "children" :
            (
                ## Minimize Button
                {
                    "name" : "MinimizeBtn",
                    "type" : "button",

                    "x" : 2,
                    "y" : 15,

                    "width" : 10,

                    "default_image" : "d:/ymir work/ui/game/belt_inventory/btn_minimize_normal.tga",
                    "over_image" : "d:/ymir work/ui/game/belt_inventory/btn_minimize_over.tga",
                    "down_image" : "d:/ymir work/ui/game/belt_inventory/btn_minimize_down.tga",
                    "disable_image" : "d:/ymir work/ui/game/belt_inventory/btn_minimize_disabled.tga",
                },

                ## Real Belt Inventory Board
                {
                    "name" : "BeltInventoryBoard",
                    "type" : "board",
                    "style" : ("attach", "float"),

                    "x" : 10,
                    "y" : 0,

                    "width" : 138,
                    "height" : 169,

                    "children" :
                    (
                        ## Belt Inventory Slots
                        {
                            "name" : "BeltInventorySlot",
                            "type" : "grid_table",

                            "x" : 5,
                            "y" : 5,

                            "start_index" : item.BELT_INVENTORY_SLOT_START,
                            "x_count" : 4,
                            "y_count" : 4,
                            "x_step" : 32,
                            "y_step" : 32,

                            "image" : "d:/ymir work/ui/public/Slot_Base.sub"
                        },
                        ##activateall
                        {
                            "name" : "UseBeltItemsButton",
                            "type" : "button",
                            "x" : 0,
                            "y" : 138,
                            "horizontal_align" : "center",
                            "default_image" : BUTTON_ROOT + "AcceptButton00.sub",
                            "over_image" : BUTTON_ROOT + "AcceptButton01.sub",
                            "down_image" : BUTTON_ROOT + "AcceptButton02.sub",
                        },
                    ),
                },
            )
        },

    ),
}
 
Üst