1. ########### uiminimap.py ###########
  2. #Arat:
  3. import interfacemodule
  4. #Ekle:
  5. if app.ENABLE_ATLAS_BOSS:
  6. import grp
  7. #Arat:
  8. class MapTextToolTip(ui.Window):
  9. #Bul:
  10. textLine.SetParent(self)
  11. #Ekle:
  12. if not app.ENABLE_ATLAS_BOSS:
  13. textLine.SetHorizontalAlignCenter()
  14. #Arat:
  15. textLine.SetOutline()
  16. #Ekle:
  17. if not app.ENABLE_ATLAS_BOSS:
  18. textLine.SetHorizontalAlignRight()
  19. else:
  20. textLine.SetHorizontalAlignLeft()
  21. #Arat:
  22. self.textLine = textLine
  23. #Ekle:
  24. if app.ENABLE_ATLAS_BOSS:
  25. textLine2 = ui.TextLine()
  26. textLine2.SetParent(self)
  27. textLine2.SetOutline()
  28. textLine2.SetHorizontalAlignLeft()
  29. textLine2.Show()
  30. self.textLine2 = textLine2
  31. #Arat:
  32. def SetText(self, text):
  33. self.textLine.SetText(text)
  34. #Ekle:
  35. if app.ENABLE_ATLAS_BOSS:
  36. def SetText2(self, text):
  37. self.textLine2.SetText(text)
  38. def ShowText2(self):
  39. self.textLine2.Show()
  40. def HideText2(self):
  41. self.textLine2.Hide()
  42. def SetTooltipPosition(self, PosX, PosY):
  43. if app.ENABLE_ATLAS_BOSS:
  44. PosY -= 24
  45. if localeinfo.IsARABIC():
  46. w, h = self.textLine.GetTextSize()
  47. self.textLine.SetPosition(PosX - w - 5, PosY)
  48. if app.ENABLE_ATLAS_BOSS:
  49. self.textLine2.SetPosition(PosX - w - 5, PosY + 10)
  50. else:
  51. self.textLine.SetPosition(PosX - 5, PosY)
  52. if app.ENABLE_ATLAS_BOSS:
  53. self.textLine2.SetPosition(PosX - 5, PosY + 10)
  54. #Arat:
  55. def SetTextColor(self, TextColor):
  56. self.textLine.SetPackedFontColor(TextColor)
  57. #Ekle:
  58. if app.ENABLE_ATLAS_BOSS:
  59. self.textLine2.SetPackedFontColor(TextColor)
  60. #Arat:
  61. def EventMouseLeftButtonUp(self):
  62. (mouseX, mouseY) = wndMgr.GetMousePosition()
  63. #Ekle:
  64. if app.ENABLE_ATLAS_BOSS:
  65. (bFind, sName, iPosX, iPosY, dwTextColor, dwGuildID, time) = miniMap.GetAtlasInfo(mouseX, mouseY)
  66. else:
  67. (bFind, sName, iPosX, iPosY, dwTextColor, dwGuildID) = miniMap.GetAtlasInfo(mouseX, mouseY)
  68. #Arat def OnUpdate(self):
  69. (mouseX, mouseY) = wndMgr.GetMousePosition()
  70. #Ekle:
  71. if app.ENABLE_ATLAS_BOSS:
  72. (bFind, sName, iPosX, iPosY, dwTextColor, dwGuildID, time) = miniMap.GetAtlasInfo(mouseX, mouseY)
  73. else:
  74. (bFind, sName, iPosX, iPosY, dwTextColor, dwGuildID) = miniMap.GetAtlasInfo(mouseX, mouseY)
  75. #Arat:
  76. if localeinfo.IsARABIC() and sName[-1].isalnum():
  77. self.tooltipInfo.SetText("(%s)%d, %d" % (sName, iPosX, iPosY))
  78. #Değiştir:
  79. if localeinfo.IsARABIC() and sName[-1].isalnum():
  80. self.tooltipInfo.SetText("(%s)%d, %d" % (sName, iPosX, iPosY))
  81. if app.ENABLE_ATLAS_BOSS:
  82. self.tooltipInfo.SetText2(localeinfo.MINIMAP_BOSS_RESPAWN_TIME % (time / 60))
  83. else:
  84. self.tooltipInfo.SetText("%s(%d, %d)" % (sName, iPosX, iPosY))
  85. if app.ENABLE_ATLAS_BOSS:
  86. self.tooltipInfo.SetText2(localeinfo.MINIMAP_BOSS_RESPAWN_TIME % (time / 60))
  87. (x, y) = self.GetGlobalPosition()
  88. self.tooltipInfo.SetTooltipPosition(mouseX - x, mouseY - y)
  89. if app.ENABLE_ATLAS_BOSS:
  90. if time > 0:
  91. self.tooltipInfo.SetTextColor(self.BOSS_COLOR)
  92. self.tooltipInfo.ShowText2()
  93. else:
  94. self.tooltipInfo.SetTextColor(dwTextColor)
  95. self.tooltipInfo.HideText2()
  96. else:
  97. self.tooltipInfo.SetTextColor(dwTextColor)
  98. self.tooltipInfo.Show()
  99. self.tooltipInfo.SetTop()