- Mesaj
- 309
- Çözümler
- 7
- Beğeni
- 94
- Puan
- 724
- Ticaret Puanı
- 0
Arkadaşlar envanterin yanındaki pencereyi nasıl kaldırabilirim acaba
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)...
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()
if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
self.wndBelt = BeltInventoryWindow(self)
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)
direkt image silse kalkar galiba neden bu kadar uzun anlattın ki :/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
image silse belki o açmalı kapamalıyı kullancak başka biyerde ayıp ettin ahmetdirekt image silse kalkar galiba neden bu kadar uzun anlattın ki :/
nasıl yani la aç biraz 6 saatlik matematik dersinden çıktımimage silse belki o açmalı kapamalıyı kullancak başka biyerde ayıp ettin ahmet
o imageyi silse mesela o image bonus tablosundada kullanılıyor ya da envanterin altına hızlı biyolog eklemek içinde kullanılıyor resim silmwk çözüm değil yaninasıl yani la aç biraz 6 saatlik matematik dersinden çıktım![]()
kimin müşterisi beyok cnm beltinventorywindow.py mi neydi ondan silse yeterli imageyi niye silsin ![]()
sadece BeltInventoryWindow.py dosyasını silmeyide denedim syserr verdi.yok cnm beltinventorywindow.py mi neydi ondan silse yeterli imageyi niye silsin ![]()
DOSYAYI SİLERSEN normal ama imageyi silersen hatayı almazsınDarklovers dostumun dediği şekilde yaptım oldu.
sadece BeltInventoryWindow.py dosyasını silmeyide denedim syserr verdi.
Herkese teşekkür ederim yardımcı olduğunuz içinKonu kapatılabilir
![]()