diff Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua @ 124:e31b02b24488

Updated for 8.0 pre-patch and BfA.
author yellowfive
date Tue, 17 Jul 2018 09:57:39 -0700
parents e635cd648e01
children
line wrap: on
line diff
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua	Mon Feb 12 19:34:09 2018 -0800
+++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua	Tue Jul 17 09:57:39 2018 -0700
@@ -1,7 +1,7 @@
 --[[-----------------------------------------------------------------------------
 EditBox Widget
 -------------------------------------------------------------------------------]]
-local Type, Version = "EditBox", 26
+local Type, Version = "EditBox", 28
 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
@@ -73,7 +73,7 @@
 	local value = frame:GetText()
 	local cancel = self:Fire("OnEnterPressed", value)
 	if not cancel then
-		PlaySound("igMainMenuOptionCheckBoxOn")
+		PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
 		HideButton(self)
 	end
 end
@@ -81,23 +81,21 @@
 local function EditBox_OnReceiveDrag(frame)
 	local self = frame.obj
 	local type, id, info = GetCursorInfo()
+	local name
 	if type == "item" then
-		self:SetText(info)
-		self:Fire("OnEnterPressed", info)
-		ClearCursor()
+		name = info
 	elseif type == "spell" then
-		local name = GetSpellInfo(id, info)
+		name = GetSpellInfo(id, info)
+	elseif type == "macro" then
+		name = GetMacroInfo(id)
+	end
+	if name then
 		self:SetText(name)
 		self:Fire("OnEnterPressed", name)
 		ClearCursor()
-	elseif type == "macro" then
-		local name = GetMacroInfo(id)
-		self:SetText(name)
-		self:Fire("OnEnterPressed", name)
-		ClearCursor()
+		HideButton(self)
+		AceGUI:ClearFocus()
 	end
-	HideButton(self)
-	AceGUI:ClearFocus()
 end
 
 local function EditBox_OnTextChanged(frame)