mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
test update AceGUIWidget-MultiLineEditBox
This commit is contained in:
@@ -10,7 +10,7 @@ local strfmt = string.format
|
|||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
|
|
||||||
-- WoW APIs
|
-- WoW APIs
|
||||||
local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, ClearCursor
|
local CursorHasItem, ClearCursor = CursorHasItem, ClearCursor
|
||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
local _G = AceCore._G
|
local _G = AceCore._G
|
||||||
|
|
||||||
@@ -196,15 +196,7 @@ local function OnMouseUp() -- ScrollFrame
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function OnReceiveDrag() -- EditBox / ScrollFrame
|
local function OnReceiveDrag() -- EditBox / ScrollFrame
|
||||||
if not GetCursorInfo then return end
|
if not CursorHasItem() then return end
|
||||||
local type, id, info = GetCursorInfo()
|
|
||||||
if type == "spell" then
|
|
||||||
local spell, rank = GetSpellName(id, info)
|
|
||||||
if rank ~= "" then spell = spell.."("..rank..")" end
|
|
||||||
info = spell
|
|
||||||
elseif type ~= "item" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
ClearCursor()
|
ClearCursor()
|
||||||
local self = this.obj
|
local self = this.obj
|
||||||
local editBox = self.editBox
|
local editBox = self.editBox
|
||||||
@@ -219,10 +211,14 @@ local function OnReceiveDrag() -- EditBox / ScrollFrame
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function OnSizeChanged() -- ScrollFrame
|
local function OnSizeChanged() -- ScrollFrame
|
||||||
|
this:UpdateScrollChildRect()
|
||||||
|
this:SetVerticalScroll(this:GetHeight())
|
||||||
this.obj.editBox:SetWidth(arg1)
|
this.obj.editBox:SetWidth(arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function OnTextChanged() -- EditBox
|
local function OnTextChanged() -- EditBox
|
||||||
|
this:UpdateScrollChildRect()
|
||||||
|
this:SetVerticalScroll(this:GetHeight())
|
||||||
local self = this.obj
|
local self = this.obj
|
||||||
local value = this:GetText()
|
local value = this:GetText()
|
||||||
if tostring(value) ~= tostring(self.lasttext) then
|
if tostring(value) ~= tostring(self.lasttext) then
|
||||||
@@ -435,7 +431,6 @@ local function Constructor()
|
|||||||
editBox:SetMultiLine(true)
|
editBox:SetMultiLine(true)
|
||||||
editBox:EnableMouse(true)
|
editBox:EnableMouse(true)
|
||||||
editBox:SetAutoFocus(false)
|
editBox:SetAutoFocus(false)
|
||||||
--editBox:SetCountInvisibleLetters(false)
|
|
||||||
editBox:SetScript("OnCursorChanged", OnCursorChanged)
|
editBox:SetScript("OnCursorChanged", OnCursorChanged)
|
||||||
editBox:SetScript("OnEditFocusLost", OnEditFocusLost)
|
editBox:SetScript("OnEditFocusLost", OnEditFocusLost)
|
||||||
editBox:SetScript("OnEnter", OnEnter)
|
editBox:SetScript("OnEnter", OnEnter)
|
||||||
|
|||||||
Reference in New Issue
Block a user