def OnRender(self): (PosX, PosY) = self.GetGlobalPosition() miniMap.RenderAtlas(float(PosX), float(PosY)) if app.IsPressed(app.DIK_LSHIFT): (mouseX, mouseY) = wndMgr.GetMousePosition() (bFind, sName, iPosX, iPosY, dwTextColor, dwGuildID) = miniMap.GetAtlasInfo(mouseX, mouseY) (iSizeX, iSizeY, SizeX, SizeY) = GetCurrentMapSize() if not bFind: width = 6 MapSizeX = miniMap.GetAtlasSize()[1] if MapSizeX == 0: size = 6 else: size = DivideToFloat(SizeX * 256, miniMap.GetAtlasSize()[1]) (sName, iPosX, iPosY, dwTextColor) = "", (mouseX - PosX) * size + width, ( mouseY - PosY) * size, -8722595 if iPosX < 0 or iPosY < 0 or iPosX > SizeX * 256 or iPosY > SizeY * 256: return self.TeleportToDest(iPosX * 100, iPosY * 100)
def OnRender(self): (x, y) = self.GetGlobalPosition() fx = float(x) fy = float(y) miniMap.RenderAtlas(fx, fy)