mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
@@ -430,6 +430,18 @@ function EditBoxGetCursorPosition(self)
|
|||||||
local otc = removeScript(self, "OnTextChanged")
|
local otc = removeScript(self, "OnTextChanged")
|
||||||
local ots = removeScript(self, "OnTextSet")
|
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)
|
self:Insert(nbsp)
|
||||||
|
|
||||||
local pos = find(self:GetText(), nbsp)
|
local pos = find(self:GetText(), nbsp)
|
||||||
@@ -441,6 +453,13 @@ function EditBoxGetCursorPosition(self)
|
|||||||
self:Insert("")
|
self:Insert("")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if charsChanged then
|
||||||
|
self:SetMaxLetters(maxChars)
|
||||||
|
end
|
||||||
|
if numeric then
|
||||||
|
self:SetNumeric(true)
|
||||||
|
end
|
||||||
|
|
||||||
if occ then self:SetScript("OnCursorChanged", occ) end
|
if occ then self:SetScript("OnCursorChanged", occ) end
|
||||||
if otc then self:SetScript("OnTextChanged", otc) end
|
if otc then self:SetScript("OnTextChanged", otc) end
|
||||||
if ots then self:SetScript("OnTextSet", ots) end
|
if ots then self:SetScript("OnTextSet", ots) end
|
||||||
@@ -467,9 +486,30 @@ function EditBoxSetCursorPosition(self, pos)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if pos == 0 then
|
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)
|
text = sub(text, 0, 1)
|
||||||
self:HighlightText(0, 1)
|
self:HighlightText(0, 1)
|
||||||
self:Insert(text)
|
self:Insert(text)
|
||||||
|
self:HighlightText(0, 1)
|
||||||
|
self:Insert("")
|
||||||
|
|
||||||
|
if charsChanged then
|
||||||
|
self:SetMaxLetters(maxChars)
|
||||||
|
end
|
||||||
|
if numeric then
|
||||||
|
self:SetNumeric(true)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
text = sub(text, pos, pos)
|
text = sub(text, pos, pos)
|
||||||
self:HighlightText(pos - 1, pos)
|
self:HighlightText(pos - 1, pos)
|
||||||
|
|||||||
@@ -147,6 +147,21 @@ function B:EnhanceColorPicker()
|
|||||||
this:SetScript("OnUpdate", HandleUpdateLimiter)
|
this:SetScript("OnUpdate", HandleUpdateLimiter)
|
||||||
end)
|
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)
|
hooksecurefunc(ColorPickerFrame, "SetFrameLevel", function(self, level)
|
||||||
for _, child in ipairs({self:GetChildren()}) do
|
for _, child in ipairs({self:GetChildren()}) do
|
||||||
child:SetFrameLevel(level + 1)
|
child:SetFrameLevel(level + 1)
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ if not AceGUIMultiLineEditBoxInsertLink then
|
|||||||
|
|
||||||
hooksecurefunc("SetItemRef", function(link, text, button)
|
hooksecurefunc("SetItemRef", function(link, text, button)
|
||||||
if IsShiftKeyDown() then
|
if IsShiftKeyDown() then
|
||||||
if strsub(link,1,6) == "player" then
|
if sub(link, 1, 6) == "player" then
|
||||||
local name = strsub(link,8)
|
local name = sub(link,8)
|
||||||
if name and (strlen(name) > 0) then
|
if name and name ~= "" then
|
||||||
return _G.AceGUIMultiLineEditBoxInsertLink(name)
|
return _G.AceGUIMultiLineEditBoxInsertLink(name)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ This UI will arrange your interface to be more flexible and practical.
|
|||||||
/ec or /elvui Toggle the configuration GUI.
|
/ec or /elvui Toggle the configuration GUI.
|
||||||
/rl or /reloadui Reload the whole UI.
|
/rl or /reloadui Reload the whole UI.
|
||||||
/moveui Open the movable frames options.
|
/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.
|
/egrid Toggles visibility of the grid for helping placement of thirdparty addons.
|
||||||
/farmmode Toggles the Minimap Farmmode.
|
/farmmode Toggles the Minimap Farmmode.
|
||||||
/in The input of how many seconds you want a command to fire.
|
/in The input of how many seconds you want a command to fire.
|
||||||
|
|||||||
Reference in New Issue
Block a user