81771ec1ec
- Added a new tab on options panel for broker config. - Added new abbreviation method called "comma". - Fully removed the delete button switch between instances, new all instances have a delete button. - Full re-write on the instance, delete and close buttons. - Fixed the total healing done by the raid group which was counting overheal too. - HotCorners now sort icons according with most used. - Few changes on all skins in order to fit on the new right menu buttons. - Added Horde avatars. - Fixed issue where shortcut panel shows below thw windows when its in Dialog strata. - Fixed problem with import data capture for charts. - API Cooltip: Added new option: TextShadow -> true or false. - New API: _detalhes.StatusBar:SetPlugin (instance, pluginname, anchor) - New API: _detalhes:SetPlayerDetailsWindowTexture (texture) - New API: _detalhes:SetOptionsWindowTexture (texture)
114 lines
3.8 KiB
Lua
114 lines
3.8 KiB
Lua
local _detalhes = _G._detalhes
|
|
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
|
|
|
local g = _detalhes.gump
|
|
local _
|
|
|
|
function _detalhes:OpenNewsWindow()
|
|
local news_window = _detalhes:CreateOrOpenNewsWindow()
|
|
|
|
news_window:Title (Loc ["STRING_NEWS_TITLE"])
|
|
news_window:Text (Loc ["STRING_VERSION_LOG"])
|
|
news_window:Icon ("Interface\\CHARACTERFRAME\\TempPortrait")
|
|
news_window:Show()
|
|
end
|
|
|
|
function _detalhes:CreateOrOpenNewsWindow()
|
|
local frame = _G.DetailsNewsWindow
|
|
|
|
-- /script _detalhes.OpenNewsWindow()
|
|
|
|
if (not frame) then
|
|
--> construir a janela de news
|
|
frame = CreateFrame ("frame", "DetailsNewsWindow", UIParent, "ButtonFrameTemplate")
|
|
frame:SetPoint ("center", UIParent, "center")
|
|
frame:SetFrameStrata ("HIGH")
|
|
frame:SetMovable (true)
|
|
frame:SetWidth (512)
|
|
frame:SetHeight (512)
|
|
tinsert (UISpecialFrames, "DetailsNewsWindow")
|
|
|
|
frame:SetScript ("OnMouseDown", function() frame:StartMoving() end)
|
|
frame:SetScript ("OnMouseUp", function() frame:StopMovingOrSizing() end)
|
|
|
|
--> reinstall textura
|
|
local textura = _detalhes.gump:NewImage (frame, [[Interface\DialogFrame\DialogAlertIcon]], 64, 64, nil, nil, nil, "$parentExclamacao")
|
|
textura:SetPoint ("topleft", frame, "topleft", 60, -10)
|
|
--> reinstall aviso
|
|
local reinstall = _detalhes.gump:NewLabel (frame, nil, "$parentReinstall", nil, "", "GameFontHighlightLeft", 10)
|
|
reinstall:SetPoint ("left", textura, "right", 2, -2)
|
|
reinstall.text = Loc ["STRING_NEWS_REINSTALL"]
|
|
|
|
|
|
local frame_upper = CreateFrame ("scrollframe", nil, frame)
|
|
local frame_lower = CreateFrame ("frame", nil, frame_upper)
|
|
frame_lower:SetSize (450, 390)
|
|
frame_upper:SetPoint ("topleft", frame, "topleft", 15, -70)
|
|
frame_upper:SetWidth (465)
|
|
frame_upper:SetHeight (400)
|
|
frame_upper:SetBackdrop({
|
|
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
|
tile = true, tileSize = 16,
|
|
insets = {left = 1, right = 1, top = 0, bottom = 1},})
|
|
frame_upper:SetBackdropColor (.1, .1, .1, .3)
|
|
frame_upper:SetScrollChild (frame_lower)
|
|
|
|
local slider = CreateFrame ("slider", nil, frame)
|
|
slider.bg = slider:CreateTexture (nil, "background")
|
|
slider.bg:SetAllPoints (true)
|
|
slider.bg:SetTexture (0, 0, 0, 0.5)
|
|
|
|
slider.thumb = slider:CreateTexture (nil, "OVERLAY")
|
|
slider.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
|
|
slider.thumb:SetSize (25, 25)
|
|
|
|
slider:SetThumbTexture (slider.thumb)
|
|
slider:SetOrientation ("vertical");
|
|
slider:SetSize (16, 399)
|
|
slider:SetPoint ("topleft", frame_upper, "topright")
|
|
slider:SetMinMaxValues (0, 1000)
|
|
slider:SetValue(0)
|
|
slider:SetScript("OnValueChanged", function (self)
|
|
frame_upper:SetVerticalScroll (self:GetValue())
|
|
end)
|
|
|
|
frame_upper:EnableMouseWheel (true)
|
|
frame_upper:SetScript("OnMouseWheel", function (self, delta)
|
|
local current = slider:GetValue()
|
|
if (IsShiftKeyDown() and (delta > 0)) then
|
|
slider:SetValue(0)
|
|
elseif (IsShiftKeyDown() and (delta < 0)) then
|
|
slider:SetValue (1000)
|
|
elseif ((delta < 0) and (current < 1000)) then
|
|
slider:SetValue (current + 20)
|
|
elseif ((delta > 0) and (current > 1)) then
|
|
slider:SetValue (current - 20)
|
|
end
|
|
end)
|
|
|
|
--> text box
|
|
local texto = frame_lower:CreateFontString ("DetailsNewsWindowText", "overlay", "GameFontNormal")
|
|
texto:SetPoint ("topleft", frame_lower, "topleft")
|
|
texto:SetJustifyH ("left")
|
|
texto:SetJustifyV ("top")
|
|
texto:SetTextColor (1, 1, 1)
|
|
texto:SetWidth (450)
|
|
texto:SetHeight (1400)
|
|
|
|
function frame:Title (title)
|
|
frame.TitleText:SetText (title or "")
|
|
end
|
|
|
|
function frame:Text (text)
|
|
texto:SetText (text or "")
|
|
end
|
|
|
|
function frame:Icon (path)
|
|
frame.portrait:SetTexture (path or nil)
|
|
end
|
|
|
|
frame:Hide()
|
|
end
|
|
|
|
return frame
|
|
end |