- ########### uiminimap.py ###########
- #Arat:
- import interfacemodule
- #Ekle:
- if app.ENABLE_ATLAS_BOSS:
- import grp
- #Arat:
- class MapTextToolTip(ui.Window):
- #Bul:
- textLine.SetParent(self)
- #Ekle:
- if not app.ENABLE_ATLAS_BOSS:
- textLine.SetHorizontalAlignCenter()
- #Arat:
- textLine.SetOutline()
- #Ekle:
- if not app.ENABLE_ATLAS_BOSS:
- textLine.SetHorizontalAlignRight()
- else:
- textLine.SetHorizontalAlignLeft()
- #Arat:
- self.textLine = textLine
- #Ekle:
- if app.ENABLE_ATLAS_BOSS:
- textLine2 = ui.TextLine()
- textLine2.SetParent(self)
- textLine2.SetOutline()
- textLine2.SetHorizontalAlignLeft()
- textLine2.Show()
- self.textLine2 = textLine2
- #Arat:
- def SetText(self, text):
- self.textLine.SetText(text)
- #Ekle:
- if app.ENABLE_ATLAS_BOSS:
- def SetText2(self, text):
- self.textLine2.SetText(text)
- def ShowText2(self):
- self.textLine2.Show()
- def HideText2(self):
- self.textLine2.Hide()
- def SetTooltipPosition(self, PosX, PosY):
- if app.ENABLE_ATLAS_BOSS:
- PosY -= 24
- if localeinfo.IsARABIC():
- w, h = self.textLine.GetTextSize()
- self.textLine.SetPosition(PosX - w - 5, PosY)
- if app.ENABLE_ATLAS_BOSS:
- self.textLine2.SetPosition(PosX - w - 5, PosY + 10)
- else:
- self.textLine.SetPosition(PosX - 5, PosY)
- if app.ENABLE_ATLAS_BOSS:
- self.textLine2.SetPosition(PosX - 5, PosY + 10)
- #Arat:
- def SetTextColor(self, TextColor):
- self.textLine.SetPackedFontColor(TextColor)
- #Ekle:
- if app.ENABLE_ATLAS_BOSS:
- self.textLine2.SetPackedFontColor(TextColor)
- #Arat:
- def EventMouseLeftButtonUp(self):
- (mouseX, mouseY) = wndMgr.GetMousePosition()
- #Ekle:
- if app.ENABLE_ATLAS_BOSS:
- (bFind, sName, iPosX, iPosY, dwTextColor, dwGuildID, time) = miniMap.GetAtlasInfo(mouseX, mouseY)
- else:
- (bFind, sName, iPosX, iPosY, dwTextColor, dwGuildID) = miniMap.GetAtlasInfo(mouseX, mouseY)
- #Arat def OnUpdate(self):
- (mouseX, mouseY) = wndMgr.GetMousePosition()
- #Ekle:
- if app.ENABLE_ATLAS_BOSS:
- (bFind, sName, iPosX, iPosY, dwTextColor, dwGuildID, time) = miniMap.GetAtlasInfo(mouseX, mouseY)
- else:
- (bFind, sName, iPosX, iPosY, dwTextColor, dwGuildID) = miniMap.GetAtlasInfo(mouseX, mouseY)
- #Arat:
- if localeinfo.IsARABIC() and sName[-1].isalnum():
- self.tooltipInfo.SetText("(%s)%d, %d" % (sName, iPosX, iPosY))
- #Değiştir:
- if localeinfo.IsARABIC() and sName[-1].isalnum():
- self.tooltipInfo.SetText("(%s)%d, %d" % (sName, iPosX, iPosY))
- if app.ENABLE_ATLAS_BOSS:
- self.tooltipInfo.SetText2(localeinfo.MINIMAP_BOSS_RESPAWN_TIME % (time / 60))
- else:
- self.tooltipInfo.SetText("%s(%d, %d)" % (sName, iPosX, iPosY))
- if app.ENABLE_ATLAS_BOSS:
- self.tooltipInfo.SetText2(localeinfo.MINIMAP_BOSS_RESPAWN_TIME % (time / 60))
- (x, y) = self.GetGlobalPosition()
- self.tooltipInfo.SetTooltipPosition(mouseX - x, mouseY - y)
- if app.ENABLE_ATLAS_BOSS:
- if time > 0:
- self.tooltipInfo.SetTextColor(self.BOSS_COLOR)
- self.tooltipInfo.ShowText2()
- else:
- self.tooltipInfo.SetTextColor(dwTextColor)
- self.tooltipInfo.HideText2()
- else:
- self.tooltipInfo.SetTextColor(dwTextColor)
- self.tooltipInfo.Show()
- self.tooltipInfo.SetTop()