- Mesaj
- 332
- Çözümler
- 15
- Beğeni
- 149
- Puan
- 529
- Ticaret Puanı
- 0
Arkadaşlar öncelikle merhaba Won sistemini ekliyorum da son olarak Python kısmı kaldı şurada tıkandım bir bakabilir missiniz? Rica Etsem.
Eklenecek Kod::
def LoadDialog(self):
PythonScriptLoader = ui.PythonScriptLoader()
if app.ENABLE_CHEQUE_SYSTEM:
PythonScriptLoader.LoadScriptFile(self, "UIScript/exchangedialog_cheque.py")
else:
PythonScriptLoader.LoadScriptFile(self, "UIScript/exchangedialog.py")
## Owner
self.OwnerSlot = self.GetChild("Owner_Slot")
self.OwnerSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectOwnerEmptySlot))
self.OwnerSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectOwnerItemSlot))
self.OwnerSlot.SetOverInItemEvent(ui.__mem_func__(self.OverInOwnerItem))
self.OwnerSlot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
self.OwnerMoney = self.GetChild("Owner_Money_Value")
self.OwnerAcceptLight = self.GetChild("Owner_Accept_Light")
self.OwnerAcceptLight.Disable()
self.OwnerMoneyButton = self.GetChild("Owner_Money")
self.OwnerMoneyButton.SetEvent(ui.__mem_func__(self.OpenPickMoneyDialog))
if app.ENABLE_CHEQUE_SYSTEM:
self.OwnerCheque = self.GetChild("Owner_Cheque_Value")
self.OwnerChequeButton = self.GetChild("Owner_Cheque")
self.OwnerChequeButton.SetEvent(ui.__mem_func__(self.OpenPickChequeDialog))
## Target
self.TargetSlot = self.GetChild("Target_Slot")
self.TargetSlot.SetOverInItemEvent(ui.__mem_func__(self.OverInTargetItem))
self.TargetSlot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
self.TargetMoney = self.GetChild("Target_Money_Value")
self.TargetAcceptLight = self.GetChild("Target_Accept_Light")
self.TargetAcceptLight.Disable()
if app.ENABLE_CHEQUE_SYSTEM:
self.TargetCheque = self.GetChild("Target_Cheque_Value")
## PickMoneyDialog
dlgPickMoney = uiPickMoney.PickMoneyDialog()
dlgPickMoney.LoadDialog()
dlgPickMoney.SetAcceptEvent(ui.__mem_func__(self.OnPickMoney))
dlgPickMoney.SetTitleName(localeInfo.EXCHANGE_MONEY)
dlgPickMoney.SetMax(9) #@warme001 7 to 9
if app.ENABLE_CHEQUE_SYSTEM:
dlgPickMoney.SetMaxCheque(3)
dlgPickMoney.Hide()
self.dlgPickMoney = dlgPickMoney
## Button
self.AcceptButton = self.GetChild("Owner_Accept_Button")
self.AcceptButton.SetToggleDownEvent(ui.__mem_func__(self.AcceptExchange))
self.TitleName = self.GetChild("TitleName")
self.GetChild("TitleBar").SetCloseEvent(net.SendExchangeExitPacket)
Benim Dosyam:
def LoadDialog(self):
PythonScriptLoader = ui.PythonScriptLoader()
if app.ENABLE_NEW_EXCHANGE_WINDOW:
PythonScriptLoader.LoadScriptFile(self, "UIScript/exchangedialog_new.py")
else:
PythonScriptLoader.LoadScriptFile(self, "UIScript/exchangedialog.py")
self.OwnerSlot = self.GetChild("Owner_Slot")
self.OwnerSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectOwnerEmptySlot))
self.OwnerSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectOwnerItemSlot))
self.OwnerSlot.SetOverInItemEvent(ui.__mem_func__(self.OverInOwnerItem))
self.OwnerSlot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
self.OwnerMoney = self.GetChild("Owner_Money_Value")
if not app.ENABLE_NEW_EXCHANGE_WINDOW:
self.OwnerAcceptLight = self.GetChild("Owner_Accept_Light")
self.OwnerAcceptLight.Disable()
self.OwnerMoneyButton = self.GetChild("Owner_Money")
self.OwnerMoneyButton.SetEvent(ui.__mem_func__(self.OpenPickMoneyDialog))
self.TargetSlot = self.GetChild("Target_Slot")
self.TargetSlot.SetOverInItemEvent(ui.__mem_func__(self.OverInTargetItem))
self.TargetSlot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
self.TargetMoney = self.GetChild("Target_Money_Value")
if not app.ENABLE_NEW_EXCHANGE_WINDOW:
self.TargetAcceptLight = self.GetChild("Target_Accept_Light")
self.TargetAcceptLight.Disable()
dlgPickMoney = uiPickMoney.PickMoneyDialog()
dlgPickMoney.LoadDialog()
dlgPickMoney.SetAcceptEvent(ui.__mem_func__(self.OnPickMoney))
dlgPickMoney.SetTitleName(localeInfo.EXCHANGE_MONEY)
if not app.ENABLE_NEW_EXCHANGE_WINDOW:
dlgPickMoney.SetMax(6)
else:
dlgPickMoney.SetMax(20)
dlgPickMoney.Hide()
self.dlgPickMoney = dlgPickMoney
self.AcceptButton = self.GetChild("Owner_Accept_Button")
self.AcceptButton.SetToggleDownEvent(ui.__mem_func__(self.AcceptExchange))
if app.ENABLE_NEW_EXCHANGE_WINDOW:
self.TargetAcceptButton = self.GetChild("Target_Accept_Button")
self.TitleName = self.GetChild("TitleName")
self.GetChild("TitleBar").SetCloseEvent(net.SendExchangeExitPacket)
if app.ENABLE_NEW_EXCHANGE_WINDOW:
self.FaceOwnerImage = self.GetChild("FaceOwner_Image")
self.FaceTargetImage = self.GetChild("FaceTarget_Image")
self.TargetName = self.GetChild("target_NameText")
self.TargetLevel = self.GetChild("target_LvText")
self.ExchangeLogs = self.GetChild("ExchangeLogs")
self.LogsScrollBar = ui.ThinScrollBar()
self.LogsScrollBar.SetParent(self.ExchangeLogs)
self.LogsScrollBar.SetPosition(442 - 75, 17)
self.LogsScrollBar.SetScrollBarSize(50)
self.LogsScrollBar.Show()
self.LogsDropList = ui.ListBoxEx()
self.LogsDropList.SetParent(self.ExchangeLogs)
self.LogsDropList.itemHeight = 12
self.LogsDropList.itemStep = 13
self.LogsDropList.SetPosition(35, 27)
self.LogsDropList.SetSize(0, 45)
self.LogsDropList.SetScrollBar(self.LogsScrollBar)
self.LogsDropList.SetViewItemCount(2)
self.LogsDropList.Show()
self.LogsScrollBar.Show()
self.listOwnerSlot = []
self.listTargetSlot = []