Asela
Rare-Mob
- Registriert
- 01.11.2008
- Beiträge
- 196
- Reaktionspunkte
- 1
- Kommentare
- 7
- Buffs erhalten
- 2
Hey habe folgendes Problem in meiner Minimap hängt die doofe Blizzard uhr rum ich kann sie auch nicht verschieben sie ist da nur ich hab in den codes dazu nix gefunden aber ich poste sie hier mal:
Code:
--[[
gMinimap
Author: Lars Norberg
License:
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program(see GPL.txt); if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Note:
This AddOn's source code is specifically designed to work with
World of Warcraft's interpreted AddOn system.
You have an implicit licence to use this AddOn with these facilities
since that is its designated purpose as per:
http://www.fsf.org/licensing/licenses/gpl-faq.html#InterpreterIncompat
]]--
gMinimap = CreateFrame("Frame", nil, UIParent);
gMinimap.ADDON = "gMinimap";
gMinimap.VERSION = GetAddOnMetadata(gMinimap.ADDON,"Version");
gMinimap:SetScript("OnEvent", function(self, event, ...) self[event](self, ...) end)
gMinimap:RegisterEvent("PLAYER_LOGIN")
function gMinimap:PLAYER_LOGIN()
--if not (arg1 == self.ADDON) then return end
self:UnregisterEvent("PLAYER_LOGIN")
self:SetScript("OnEvent", nil)
-- load the clock manager
LoadAddOn("Blizzard_TimeManager")
-- making some functions to calculate ideal UIscale, as well
UI_SCALE_IDEAL = UI_SCALE_IDEAL or function() return 768 / tonumber(string.match(GetCVar("gxResolution"), "%d+x(%d+)")) end
UI_SCALE_MULTIPLIER = UI_SCALE_MULTIPLIER or function() return UI_SCALE_IDEAL() / tonumber(GetCVar("uiScale")) end
-- settings
local COORDINATE_PRECISION = COORDINATE_PRECISION or 1
local UIPADDING = UIPADDING or 8
local MINIMAP_POSITION = MINIMAP_POSITION or {"TOPRIGHT", UIParent, "TOPRIGHT", -UIPADDING * 1.5, -UIPADDING * 1.5}
local MINIMAP_SIZE = (MINIMAP_SIZE or 150) / UI_SCALE_MULTIPLIER()
local mailboxicon = gMedia.icons["MAILBOX"]
local fontsize = 14
local font = gMedia.fonts["ARIALN"]
local numberfont = gMedia.fonts["RUSSEL"]
-- hide a lot of default UI stuff
local hiddenObjects = {MinimapBorder, MinimapBorderTop, MinimapZoomIn, MinimapZoomOut, MiniMapVoiceChatFrame, GameTimeFrame, MiniMapLFGFrameBorder, MiniMapWorldMapButton, MiniMapTracking, MiniMapBattlefieldBorder, MiniMapMailBorder, MinimapNorthTag}
for i,v in pairs(hiddenObjects) do v:Hide(); end
-- unregister tons of events
local noEvents = {MiniMapVoiceChatFrame, MiniMapWorldMapButton, MiniMapTracking}
for i,v in pairs(noEvents) do v:UnregisterAllEvents(); end
-- ghettoremoval of some .Show functions
local noShow = {MiniMapVoiceChatFrame, MinimapNorthTag}
for i,v in pairs(noShow) do v.Show = function() end; end
-- position stuff on the Minimap
local mapPoints = {
[0] = {
object = MiniMapInstanceDifficulty,
point = "TOPLEFT", relativepoint = "TOPLEFT",
xoffset = -4, yoffset = 4,
},
[1] = {
object = TimeManagerClockButton,
point = "TOP", relativepoint = "TOP",
xoffset = 0, yoffset = -16,
},
[2] = {
object = MinimapZoneTextButton,
point = "TOP", relativepoint = "TOP",
xoffset = 0, yoffset = -3,
},
[3] = {
object = MiniMapLFGFrame,
point = "BOTTOMRIGHT", relativepoint = "BOTTOMRIGHT",
xoffset = 4, yoffset = -4,
},
[4] = {
object = LFDSearchStatus,
point = "TOP", relativepoint = "BOTTOM",
xoffset = 0, yoffset = -12,
},
[5] = {
object = MiniMapBattlefieldFrame,
point = "BOTTOMLEFT", relativepoint = "BOTTOMLEFT",
xoffset = -4, yoffset = -4,
},
[6] = {
object = MiniMapMailFrame,
point = "BOTTOM", relativepoint = "BOTTOM",
xoffset = 0, yoffset = 16,
},
}
for i,v in pairs(mapPoints) do
v.object:ClearAllPoints();
v.object:SetParent(Minimap)
v.object:SetPoint(v.point, Minimap, v.relativepoint, v.xoffset, v.yoffset)
end
LFDSearchStatus:SetClampedToScreen(true)
MinimapZoneTextButton:Show();
MinimapZoneTextButton:SetWidth(Minimap:GetWidth() - 8)
MinimapZoneText:SetFont(font, fontsize, "THINOUTLINE")
MiniMapMailIcon:SetTexture(mailboxicon)
MiniMapMailIcon:SetAllPoints(MiniMapMailFrame)
MiniMapMailFrame:SetHeight(24)
MiniMapMailFrame:SetWidth(24)
-- Enable mouse scrolling
Minimap:EnableMouseWheel(true)
Minimap:SetScript("OnMouseWheel", function(self, d)
if d > 0 then
_G.MinimapZoomIn:Click()
elseif d < 0 then
_G.MinimapZoomOut:Click()
end
end)
-- Tracking on right click, calendar on middle, ping on left
Minimap:SetScript("OnMouseUp", function(self, b)
if b == "RightButton" then
ToggleDropDownMenu(1, nil, MiniMapTrackingDropDown, self)
elseif b == "MiddleButton" then
return ToggleCalendar()
else
Minimap_OnClick(self)
end
end)
-- Set Square Map Mask. Any square transparent texture will do.
Minimap:SetMaskTexture(gMedia.texture["BLANK"])
-- Ajust minimap position and skin it in gUI-style
Minimap:SetWidth(MINIMAP_SIZE - UIPADDING/2)
Minimap:SetHeight(MINIMAP_SIZE - UIPADDING/2)
Minimap:SetPoint(unpack(MINIMAP_POSITION))
-- Make sure the cluster is at the same spot as the Minimap
MinimapCluster:ClearAllPoints()
MinimapCluster:SetWidth(Minimap:GetWidth())
MinimapCluster:SetHeight(Minimap:GetHeight())
MinimapCluster:SetPoint("CENTER", UIParent, "TOPLEFT", Minimap:GetWidth()/2 + MINIMAP_POSITION[4], -Minimap:GetHeight()/2 + MINIMAP_POSITION[5])
--Minimap.FrameBackdrop:SetAllPoints(Minimap)
Minimap.FrameBackdrop = gMedia:panel(MinimapCluster, Minimap, Minimap, Minimap, 2, "BACKGROUND")
-- Adopt the Minimap to our backdrop
Minimap:SetParent(Minimap.FrameBackdrop)
end