WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   challenge mode instance difficulty flag (https://www.wowinterface.com/forums/showthread.php?t=53241)

badness 03-19-16 11:34 PM

challenge mode instance difficulty flag
 
What is the name of the function for the challenge mode flag?

Fizzlemizz 03-19-16 11:46 PM

I'm not exactly sure what you are looking for but maybe GetChallengeMode()?

badness 03-20-16 12:38 AM

you have
GuildInstanceDifficulty:ClearAllPoints()
GuildInstanceDifficulty:SetPoint("TOPLEFT", Minimap, 0, 1)
GuildInstanceDifficulty:SetBackdropBorderColor(0, 0, 0)
GuildInstanceDifficulty:SetAlpha(1)

I want to know what is the one for the challenge mode flag so i can move it on the minimap

TOM_RUS 03-20-16 01:06 AM

Probably MiniMapChallengeMode (and symbol texture GuildInstanceDifficultyChallengeModeTexture).

sirann 03-20-16 08:39 AM

MiniMapInstanceDifficulty is what you are looking for.

The flag changes based on what kind of dungeon you are in, and the number value associated with the instance type can be found through GetInstanceInfo() http://wowprogramming.com/docs/api/GetInstanceInfo

badness 03-25-16 07:04 AM

Code:

-- made by Gempir on wowinterface.com
-- Icon Credit: http://cliparts.co/clip-art-sword

Minimap:ClearAllPoints()
Minimap:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -710, -1016)
Minimap:SetSize(146, 146)

Minimap:SetBackdrop({
                bgFile =  "Interface\\ChatFrame\\ChatFrameBackground",
        --edgeFile = "Interface\\Buttons\\WHITE8x8", edgeSize = 1,
                insets = {left = 0, right = 0, top = 0, bottom = 0}
                                        })
Minimap:SetBackdropColor(0,0,0,0)
Minimap:SetBackdropBorderColor(0,0,0,0)

-- displays time/clock

if not IsAddOnLoaded("Blizzard_TimeManager") then
  LoadAddOn("Blizzard_TimeManager")
end

-- Remove "--" in next line for 24h format
-- if not TimeManagerMilitaryTimeCheck:GetChecked() then TimeManagerMilitaryTimeCheck:Click() end

local clockFrame, clockTime = TimeManagerClockButton:GetRegions()
clockFrame:Hide()
clockTime:SetFont("Interface\\Addons\\wMinimap\\square.ttf", 12, "THINOUTLINE")
clockTime:SetTextColor(1,1,1)
TimeManagerClockButton:SetPoint("CENTER", Minimap, "BOTTOM", 0,11)
clockTime:Show()

-- Shape Square

Minimap:SetMaskTexture('Interface\\ChatFrame\\ChatFrameBackground')

-- functions

local function StripTextures(object, kill)
        for i=1, object:GetNumRegions() do
                local region = select(i, object:GetRegions())
                if region:GetObjectType() == "Texture" then
                        if kill then
                                region:Hide()
                        else
                                region:SetTexture(nil)
                        end
                end
        end               
end

-- stripping textures from some icon

StripTextures(QueueStatusFrame)
StripTextures(GarrisonLandingPageMinimapButton)

-- Minimap Buttons

MinimapBorder:Hide()
MinimapZoomIn:Hide()
MinimapZoomOut:Hide()
MinimapBorderTop:Hide()
MiniMapVoiceChatFrame:Hide()
MinimapNorthTag:SetTexture(nil)
MinimapZoneTextButton:Hide()
MiniMapWorldMapButton:Hide()

--InstanceDifficulty

MiniMapInstanceDifficulty:ClearAllPoints()
MiniMapInstanceDifficulty:SetPoint("TOPLEFT", Minimap, 0, 1)
--MiniMapInstanceDifficultyButtonBorder:Hide()
MiniMapInstanceDifficulty:SetBackdropBorderColor(0, 0, 0)
MiniMapInstanceDifficulty:SetAlpha(1)
--MiniMapInstanceDifficulty:Hide()
GameTimeFrame:Hide()

--Mail

MiniMapMailFrame:ClearAllPoints()
MiniMapMailFrame:SetPoint("TOPLEFT", Minimap, -1,2)
MiniMapMailFrame:SetFrameStrata("LOW")
MiniMapMailIcon:SetTexture("Interface\\Addons\\wMinimap\\mail")
MiniMapMailBorder:Hide()
MiniMapMailFrame:SetScale(1.2)

--GuildInstanceDifficulty

GuildInstanceDifficulty:ClearAllPoints()
GuildInstanceDifficulty:SetPoint("TOPLEFT", Minimap, 0, 1)
GuildInstanceDifficulty:SetBackdropBorderColor(0, 0, 0)
GuildInstanceDifficulty:SetAlpha(1)


-- Garrison

GarrisonLandingPageMinimapButton:SetSize(38, 38)
GarrisonLandingPageMinimapButton:SetAlpha(0)
GarrisonLandingPageMinimapButton:ClearAllPoints()
GarrisonLandingPageMinimapButton:SetParent(Minimap)
GarrisonLandingPageMinimapButton:SetPoint("BOTTOMRIGHT", Minimap, "BOTTOMRIGHT", 4, -4)

local GarrisonIcon = CreateFrame("Frame", "GarrisonIcon")
GarrisonIcon:SetPoint("CENTER", GarrisonLandingPageMinimapButton, "CENTER", 0,0)
GarrisonIcon:SetSize(11,11)
GarrisonIcon:SetBackdrop{
        bgFile = "Interface\\Addons\\wMinimap\\garrison"
}
GarrisonIcon:SetAlpha(0)

-- DungeonFinder LFG LFR

QueueStatusMinimapButton:ClearAllPoints()
QueueStatusMinimapButton:SetPoint("BOTTOMLEFT", Minimap, "BOTTOMLEFT", 0, -2)
QueueStatusMinimapButtonBorder:Hide()
QueueStatusFrame:SetBackdrop({
                bgFile =  [=[Interface\ChatFrame\ChatFrameBackground]=],
        edgeFile = "Interface\\Buttons\\WHITE8x8", edgeSize = 1,
                insets = {left = -0, right = -0, top = -0, bottom = -0}
        })
QueueStatusFrame:SetBackdropColor(0,0,0,0.5)
QueueStatusFrame:SetBackdropBorderColor(0,0,0,1)
QueueStatusFrame:SetBackdropBorderColor(0, 0, 0,1)

--Tracking

MiniMapTrackingBackground:SetAlpha(0)
MiniMapTracking:ClearAllPoints()
MiniMapTracking:SetPoint("TOPRIGHT", Minimap, 1, 1)
MiniMapTrackingButtonBorder:Hide()
MiniMapTrackingButton:SetBackdropBorderColor(0, 0, 0)
MiniMapTracking:SetAlpha(0)

local function OnLeave()
    if not Minimap:IsMouseOver() then
            MiniMapTracking:SetAlpha(0)
            GarrisonIcon:SetAlpha(0)
    end
end
 
Minimap:HookScript('OnEnter', function()
        MiniMapTracking:SetAlpha(1)
        GarrisonIcon:SetAlpha(1)
        end)
Minimap:HookScript('OnLeave', OnLeave)
MiniMapTrackingButton:HookScript('OnLeave', OnLeave)
QueueStatusMinimapButton:HookScript('OnLeave', OnLeave)
MiniMapMailFrame:HookScript('OnLeave', OnLeave)
TimeManagerClockButton:HookScript('OnLeave', OnLeave)

-- Scrolling in Minimap

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)

here is the code to my minimap and as you can see i have the minimap instance difficulty function but the challenge mode flag still stays in its default position and not anchored to my minimap

sirann 03-25-16 08:34 AM

You also need to ensure it's OnShow Event is nil

This hides all flags on the minimap:
Lua Code:
  1. MiniMapInstanceDifficulty:Hide()
  2. MiniMapInstanceDifficulty.Show = function() end
  3. GuildInstanceDifficulty:Hide()
  4. GuildInstanceDifficulty.Show = function() end

badness 03-28-16 09:09 PM

Quote:

Originally Posted by TOM_RUS (Post 313680)
Probably MiniMapChallengeMode (and symbol texture GuildInstanceDifficultyChallengeModeTexture).

thanks alot!


All times are GMT -6. The time now is 03:59 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI