some changes

This commit is contained in:
onurcan488
2026-02-16 21:02:48 +03:00
parent a32a6afb08
commit 5ce1479707
10 changed files with 57 additions and 5 deletions

View File

@@ -173,6 +173,7 @@ class Interface(object):
wndInventory.BindInterfaceClass(self)
if app.ENABLE_DRAGON_SOUL_SYSTEM:
wndDragonSoul = uiDragonSoul.DragonSoulWindow()
wndDragonSoul.BindInterfaceClass(self)
wndDragonSoulRefine = uiDragonSoul.DragonSoulRefineWindow()
else:
wndDragonSoul = None
@@ -1697,6 +1698,10 @@ class Interface(object):
def EmptyFunction(self):
pass
def UseDSSButtonEffect(self, enable):
if self.wndInventory:
self.wndInventory.UseDSSButtonEffect(enable)
if __name__ == "__main__":
import app

View File

@@ -1470,6 +1470,10 @@ class SlotWindow(Window):
wndMgr.SetSlot(self.hWnd, renderingSlotNumber, emotionIndex, 1, 1, icon)
def SetRenderSlot(self, renderingSlotNumber, diffuseColor = (1.0, 1.0, 1.0, 1.0)):
wndMgr.SetSlot(self.hWnd, renderingSlotNumber, 1, 1, 1, 0, diffuseColor)
wndMgr.SetSlotCount(self.hWnd, renderingSlotNumber, 0)
## Event
def OnSelectEmptySlot(self, slotNumber):
if self.eventSelectEmptySlot:

View File

@@ -118,7 +118,7 @@ class HorseImage(ui.ExpandedImageBox):
try:
grade = self.__GetHorseGrade(level)
self.__AppendText(localeInfo.LEVEL_LIST[grade])
self.__AppendText(localeInfo.LEVEL_LIST[int(grade)])
except IndexError:
print(("HorseImage.SetState(level=%d, health=%d, battery=%d) - Unknown Index" % (level, health, battery)))
return

View File

@@ -253,6 +253,18 @@ class DragonSoulWindow(ui.ScriptWindow):
break
self.wndEquip.RefreshSlot()
def ActivateEquipSlotWindow(self, deck):
for i in range(6):
if deck == 2:
plusCount = 6
else:
plusCount = 0
self.wndEquip.ActivateSlot(player.DRAGON_SOUL_EQUIPMENT_SLOT_START + i + plusCount)
def DeactivateEquipSlotWindow(self):
for i in range(12):
self.wndEquip.DeactivateSlot(player.DRAGON_SOUL_EQUIPMENT_SLOT_START + i)
def RefreshStatus(self):
self.RefreshItemSlot()
@@ -686,11 +698,17 @@ class DragonSoulWindow(ui.ScriptWindow):
self.deckTab[(deck + 1) % 2].SetUp()
self.RefreshEquipSlotWindow()
self.ActivateEquipSlotWindow(deck)
if self.interface:
self.interface.UseDSSButtonEffect(self.isActivated)
self.__WarmDragonSoulTimeCache(deck)
def DeactivateDragonSoul(self):
self.isActivated = False
self.activateButton.SetUp()
self.DeactivateEquipSlotWindow()
if self.interface:
self.interface.UseDSSButtonEffect(self.isActivated)
if self.tooltipItem:
self.tooltipItem.ClearDragonSoulTimeCache()
@@ -810,6 +828,10 @@ class DragonSoulWindow(ui.ScriptWindow):
self.listHighlightedSlot.append (slot)
# Slot highlight related end
def BindInterfaceClass(self, interface):
from _weakref import proxy
self.interface = proxy(interface)
def SetDragonSoulRefineWindow(self, wndDragonSoulRefine):
if app.ENABLE_DRAGON_SOUL_SYSTEM:
from _weakref import proxy

View File

@@ -416,6 +416,7 @@ class InventoryWindow(ui.ScriptWindow):
self.questionDialog = None
self.mallButton = None
self.DSSButton = None
self.DSSButtonEffect = None
self.interface = None
if self.wndCostume:
@@ -473,6 +474,25 @@ class InventoryWindow(ui.ScriptWindow):
print("click_dss_button")
self.interface.ToggleDragonSoulWindow()
def UseDSSButtonEffect(self, enable):
if self.DSSButton:
DSSButtonEffect = ui.SlotWindow()
DSSButtonEffect.AddFlag("attach")
DSSButtonEffect.SetParent(self.DSSButton)
DSSButtonEffect.SetPosition(3.2, 0)
DSSButtonEffect.AppendSlot(0, 0, 0, 32, 32)
DSSButtonEffect.SetRenderSlot(0)
DSSButtonEffect.RefreshSlot()
if enable == True:
DSSButtonEffect.ActivateSlot(0)
DSSButtonEffect.Show()
else:
DSSButtonEffect.DeactivateSlot(0)
DSSButtonEffect.Hide()
self.DSSButtonEffect = DSSButtonEffect
def ClickCostumeButton(self):
print("Click Costume Button")
if self.wndCostume: