Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/Shestak/ShestakUI
Browse files Browse the repository at this point in the history
Conflicts:
	DarkShestakUI/Modules/Skins/Blizzard/Interface.lua
	DarkShestakUI/Modules/Skins/Blizzard/Options.lua
  • Loading branch information
fufaldinav committed Mar 24, 2015
2 parents 87ddd30 + b727053 commit c7ab5ee
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 55 deletions.
35 changes: 6 additions & 29 deletions DarkShestakUI/Modules/Automation/Screenshots.lua
Expand Up @@ -2,35 +2,12 @@
if C.automation.screenshot ~= true then return end

----------------------------------------------------------------------------------------
-- Take screenshots of Achievements(Based on Achievement Screenshotter by Blamdarot)
-- Take screenshots of defined events (Sinaris)
----------------------------------------------------------------------------------------
local function TakeScreen(delay, func, ...)
local waitTable = {}
local waitFrame = CreateFrame("Frame", "WaitFrame", UIParent)
waitFrame:SetScript("onUpdate", function (self, elapse)
local count = #waitTable
local i = 1
while (i <= count) do
local waitRecord = tremove(waitTable, i)
local d = tremove(waitRecord, 1)
local f = tremove(waitRecord, 1)
local p = tremove(waitRecord, 1)
if d > elapse then
tinsert(waitTable, i, {d-elapse, f, p})
i = i + 1
else
count = count - 1
f(unpack(p))
end
end
end)
tinsert(waitTable, {delay, func, {...} })
local function OnEvent( self, event, ... )
C_Timer.After( 1, function() Screenshot() end )
end

local function OnEvent(...)
TakeScreen(1, TakeScreenshot)
end

local frame = CreateFrame("Frame")
frame:RegisterEvent("ACHIEVEMENT_EARNED")
frame:SetScript("OnEvent", OnEvent)
local EventFrame = CreateFrame( 'Frame' )
EventFrame:RegisterEvent( 'ACHIEVEMENT_EARNED' )
EventFrame:SetScript( 'OnEvent', OnEvent )
2 changes: 2 additions & 0 deletions DarkShestakUI/Modules/Blizzard/Bags.lua
Expand Up @@ -141,7 +141,9 @@ function Stuffing:SlotUpdate(b)

if b.cooldown and StuffingFrameBags and StuffingFrameBags:IsShown() then
local start, duration, enable = GetContainerItemCooldown(b.bag, b.slot)
if ( duration > 0 and enable == 1 ) then
CooldownFrame_SetTimer(b.cooldown, start, duration, enable)
end
end

if clink then
Expand Down
32 changes: 22 additions & 10 deletions DarkShestakUI/Modules/Chat/CopyUrl.lua
Expand Up @@ -22,7 +22,13 @@ for _, event in pairs({
"CHAT_MSG_BN_WHISPER",
"CHAT_MSG_SAY",
"CHAT_MSG_INSTANCE_CHAT",
"CHAT_MSG_INSTANCE_CHAT_LEADER"
"CHAT_MSG_INSTANCE_CHAT_LEADER",
"CHAT_MSG_BATTLEGROUND_LEADER",
"CHAT_MSG_BN_CONVERSATION",
"CHAT_MSG_RAID_WARNING",
"CHAT_MSG_OFFICER",
"CHAT_MSG_BATTLEGROUND",
"CHAT_MSG_YELL"
}) do
ChatFrame_AddMessageEventFilter(event, function(self, event, str, ...)
for _, pattern in pairs(patterns) do
Expand All @@ -34,12 +40,18 @@ for _, event in pairs({
end)
end

local orig = SetItemRef
function SetItemRef(link, str, ...)
if string.sub(link, 1, 3) ~= "url" then return orig(link, str, ...) end

local editbox = ChatEdit_ChooseBoxForSend()
ChatEdit_ActivateChat(editbox)
editbox:Insert(string.sub(link, 5))
editbox:HighlightText()
end
local SetHyperlink = _G.ItemRefTooltip.SetHyperlink
function _G.ItemRefTooltip:SetHyperlink(link, ...)
if link and (strsub(link, 1, 3) == "url") then
local url = strsub(link, 5)

local editbox = ChatEdit_ChooseBoxForSend()
ChatEdit_ActivateChat(editbox)
editbox:Insert(string.sub(link, 5))
editbox:HighlightText()

return
end

SetHyperlink(self, link, ...)
end
20 changes: 9 additions & 11 deletions DarkShestakUI/Modules/Chat/Invite.lua
@@ -1,16 +1,14 @@
local T, C, L, _ = unpack(select(2, ...))
local T, C, L, _ = unpack(select(2, ...))
if C.chat.enable ~= true then return end

----------------------------------------------------------------------------------------
-- Invite player(by Zork)
-- Alt Click to Invite player
----------------------------------------------------------------------------------------
local origSetItemRef = SetItemRef
SetItemRef = function(link, text, ...)
local linkType = string.sub(link, 1, 6)
if IsAltKeyDown() and linkType == "player" then
local name = string.match(link, "player:([^:]+)")
InviteUnit(name)
return nil
hooksecurefunc("SetItemRef", function(link) --Secure hook to avoid taint
if IsAltKeyDown() then
local ChatFrameEditBox = ChatEdit_ChooseBoxForSend()
local player = link:match("^player:([^:]+)")
InviteToGroup(player)
ChatEdit_OnEscapePressed(ChatFrameEditBox) -- Secure hook opens whisper, so closing it.
end
return origSetItemRef(link, text, ...)
end
end)
13 changes: 12 additions & 1 deletion DarkShestakUI/Modules/Skins/Blizzard/Interface.lua
Expand Up @@ -36,6 +36,7 @@ local function LoadSkin()
"InterfaceOptionsFrameCancel",
"InterfaceOptionsFrameTab1",
"InterfaceOptionsFrameTab2",
"InterfaceOptionsSocialPanelTwitterLoginButton",
"InterfaceOptionsHelpPanelResetTutorials"
}

Expand Down Expand Up @@ -80,6 +81,7 @@ local function LoadSkin()
"DisplayPanelCinematicSubtitles",
"DisplayPanelRotateMinimap",
"DisplayPanelShowAccountAchievments",
"DisplayPanelShowFreeBagSpace",
-- Objectives
"ObjectivesPanelAutoQuestTracking",
"ObjectivesPanelMapQuestDifficulty",
Expand All @@ -94,6 +96,7 @@ local function LoadSkin()
"SocialPanelGuildMemberAlert",
"SocialPanelChatMouseScroll",
"SocialPanelWholeChatWindowClickable",
"SocialPanelEnableTwitter",
-- ActionBars
"ActionBarsPanelBottomLeft",
"ActionBarsPanelBottomRight",
Expand Down Expand Up @@ -187,6 +190,11 @@ local function LoadSkin()
"MousePanelClickToMove",
"MousePanelWoWMouse",
"MousePanelEnableMouseSpeed",
--Assessability
"AccessibilityPanelMovePad",
"AccessibilityPanelColorblindMode",
--Watev
"NamesPanelUnitNameplatesNameplateClassColors",
-- Help
"HelpPanelShowTutorials",
"HelpPanelEnhancedTooltips",
Expand Down Expand Up @@ -258,6 +266,7 @@ local function LoadSkin()
"CameraPanelStyleDropDown",
"MousePanelClickMoveStyleDropDown",
"ObjectivesPanelQuestSorting",
"AccessibilityPanelColorFilterDropDown",
"DisplayPanelOutlineDropDown"
}

Expand Down Expand Up @@ -294,7 +303,9 @@ local function LoadSkin()
"InterfaceOptionsCameraPanelMaxDistanceSlider",
"InterfaceOptionsCameraPanelFollowSpeedSlider",
"InterfaceOptionsMousePanelMouseSensitivitySlider",
"InterfaceOptionsMousePanelMouseLookSpeedSlider"
"InterfaceOptionsMousePanelMouseLookSpeedSlider",
"InterfaceOptionsAccessibilityPanelColorblindStrengthSlider",
"OpacityFrameSlider"
}

for i = 1, getn(sliders) do
Expand Down
9 changes: 9 additions & 0 deletions DarkShestakUI/Modules/Skins/Blizzard/Options.lua
Expand Up @@ -89,6 +89,7 @@ local function LoadSkin()
"AudioOptionsVoicePanelEnableVoice",
"AudioOptionsVoicePanelEnableMicrophone",
"AudioOptionsVoicePanelPushToTalkSound",
"AudioOptionsSoundPanelDialogSounds",
"NetworkOptionsPanelOptimizeSpeed",
"NetworkOptionsPanelUseIPv6",
"NetworkOptionsPanelAdvancedCombatLogging",
Expand Down Expand Up @@ -120,10 +121,17 @@ local function LoadSkin()
"Graphics_LiquidDetailDropDown",
"Graphics_SunshaftsDropDown",
"Graphics_ParticleDensityDropDown",
"Graphics_DepthEffectsDropDown",
"Graphics_LightingQualityDropDown",
"Graphics_OutlineModeDropDown",
"Advanced_BufferingDropDown",
"Advanced_LagDropDown",
"Advanced_HardwareCursorDropDown",
"Advanced_GraphicsAPIDropDown",
"Advanced_MultisampleAntiAliasingDropDown",
"Advanced_MultisampleAlphaTest",
"Advanced_PostProcessAntiAliasingDropDown",
"Advanced_ResampleQualityDropDown",
"AudioOptionsSoundPanelHardwareDropDown",
"AudioOptionsSoundPanelSoundChannelsDropDown",
"AudioOptionsVoicePanelInputDeviceDropDown",
Expand Down Expand Up @@ -158,6 +166,7 @@ local function LoadSkin()
"Advanced_MaxFPSSlider",
"Advanced_MaxFPSBKSlider",
"Advanced_GammaSlider",
"Advanced_RenderScaleSlider",
"AudioOptionsSoundPanelSoundQuality",
"AudioOptionsSoundPanelMasterVolume",
"AudioOptionsSoundPanelSoundVolume",
Expand Down
9 changes: 5 additions & 4 deletions DarkShestakUI/Modules/Tooltip/MultiItemRef.lua
Expand Up @@ -58,8 +58,9 @@ local ShowTip = function(tip, link)
tip:SetHyperlink(link)
end

local _SetItemRef = SetItemRef
function SetItemRef(...)
--// Quick Fix for taint error, bit buggy atm / opens 2x windows sometimes of same.
--local _SetItemRef = SetItemRef
hooksecurefunc("SetItemRef", function(...)
local link, text, button = ...
local handled = strsplit(":", link)
if not IsModifiedClick() and handled and types[handled] then
Expand All @@ -68,6 +69,6 @@ function SetItemRef(...)
ShowTip(tip, link)
end
else
return _SetItemRef(...)
--return _SetItemRef(...)
end
end
end)

0 comments on commit c7ab5ee

Please sign in to comment.