Merge pull request #65 from ElvUI-Vanilla/dev

update
This commit is contained in:
Crum
2018-11-22 17:22:49 -06:00
committed by GitHub
4 changed files with 59 additions and 3 deletions
+40
View File
@@ -430,6 +430,18 @@ function EditBoxGetCursorPosition(self)
local otc = removeScript(self, "OnTextChanged")
local ots = removeScript(self, "OnTextSet")
local charsChanged, numeric
local maxChars = self:GetMaxLetters()
if maxChars == self:GetNumLetters() then
self:SetMaxLetters(maxChars + 1)
charsChanged = true
end
if self:IsNumeric() then
self:SetNumeric(false)
numeric = true
end
self:Insert(nbsp)
local pos = find(self:GetText(), nbsp)
@@ -441,6 +453,13 @@ function EditBoxGetCursorPosition(self)
self:Insert("")
end
if charsChanged then
self:SetMaxLetters(maxChars)
end
if numeric then
self:SetNumeric(true)
end
if occ then self:SetScript("OnCursorChanged", occ) end
if otc then self:SetScript("OnTextChanged", otc) end
if ots then self:SetScript("OnTextSet", ots) end
@@ -467,9 +486,30 @@ function EditBoxSetCursorPosition(self, pos)
end
if pos == 0 then
local charsChanged, numeric
local maxChars = self:GetMaxLetters()
if maxChars == self:GetNumLetters() then
self:SetMaxLetters(maxChars + 1)
charsChanged = true
end
if self:IsNumeric() then
self:SetNumeric(false)
numeric = true
end
text = sub(text, 0, 1)
self:HighlightText(0, 1)
self:Insert(text)
self:HighlightText(0, 1)
self:Insert("")
if charsChanged then
self:SetMaxLetters(maxChars)
end
if numeric then
self:SetNumeric(true)
end
else
text = sub(text, pos, pos)
self:HighlightText(pos - 1, pos)
+15
View File
@@ -147,6 +147,21 @@ function B:EnhanceColorPicker()
this:SetScript("OnUpdate", HandleUpdateLimiter)
end)
hooksecurefunc(ColorPickerFrame, "SetFrameLevel", function(self, level)
for _, child in ipairs({self:GetChildren()}) do
child:SetFrameLevel(level + 1)
if child:GetFrameType() == "EditBox" then
for _, child in ipairs({child:GetChildren()}) do
child:SetFrameLevel(level + 1)
end
end
end
--Set OnUpdate script to handle update limiter
this:SetScript("OnUpdate", HandleUpdateLimiter)
end)
hooksecurefunc(ColorPickerFrame, "SetFrameLevel", function(self, level)
for _, child in ipairs({self:GetChildren()}) do
child:SetFrameLevel(level + 1)
@@ -61,9 +61,9 @@ if not AceGUIMultiLineEditBoxInsertLink then
hooksecurefunc("SetItemRef", function(link, text, button)
if IsShiftKeyDown() then
if strsub(link,1,6) == "player" then
local name = strsub(link,8)
if name and (strlen(name) > 0) then
if sub(link, 1, 6) == "player" then
local name = sub(link,8)
if name and name ~= "" then
return _G.AceGUIMultiLineEditBoxInsertLink(name)
end
else
+1
View File
@@ -37,6 +37,7 @@ This UI will arrange your interface to be more flexible and practical.
/ec or /elvui Toggle the configuration GUI.
/rl or /reloadui Reload the whole UI.
/moveui Open the movable frames options.
/bgstats Toggles Battleground datatexts to display info when inside a battleground.
/egrid Toggles visibility of the grid for helping placement of thirdparty addons.
/farmmode Toggles the Minimap Farmmode.
/in The input of how many seconds you want a command to fire.