comparison Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua @ 18:a0dcdcaec1ea v7.3.0.018

- toc update. - libs update.
author Tercio
date Tue, 17 Oct 2017 10:02:01 -0200
parents ce416064d8a1
children
comparison
equal deleted inserted replaced
17:da84a5064a5a 18:a0dcdcaec1ea
1 --[[----------------------------------------------------------------------------- 1 --[[-----------------------------------------------------------------------------
2 EditBox Widget 2 EditBox Widget
3 -------------------------------------------------------------------------------]] 3 -------------------------------------------------------------------------------]]
4 local Type, Version = "EditBox", 25 4 local Type, Version = "EditBox", 27
5 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) 5 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
6 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end 6 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
7 7
8 -- Lua APIs 8 -- Lua APIs
9 local tostring, pairs = tostring, pairs 9 local tostring, pairs = tostring, pairs
71 local function EditBox_OnEnterPressed(frame) 71 local function EditBox_OnEnterPressed(frame)
72 local self = frame.obj 72 local self = frame.obj
73 local value = frame:GetText() 73 local value = frame:GetText()
74 local cancel = self:Fire("OnEnterPressed", value) 74 local cancel = self:Fire("OnEnterPressed", value)
75 if not cancel then 75 if not cancel then
76 PlaySound("igMainMenuOptionCheckBoxOn") 76 PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
77 HideButton(self) 77 HideButton(self)
78 end 78 end
79 end 79 end
80 80
81 local function EditBox_OnReceiveDrag(frame) 81 local function EditBox_OnReceiveDrag(frame)
198 ["SetFocus"] = function(self) 198 ["SetFocus"] = function(self)
199 self.editbox:SetFocus() 199 self.editbox:SetFocus()
200 if not self.frame:IsShown() then 200 if not self.frame:IsShown() then
201 self.frame:SetScript("OnShow", Frame_OnShowFocus) 201 self.frame:SetScript("OnShow", Frame_OnShowFocus)
202 end 202 end
203 end,
204
205 ["HighlightText"] = function(self, from, to)
206 self.editbox:HighlightText(from, to)
203 end 207 end
204 } 208 }
205 209
206 --[[----------------------------------------------------------------------------- 210 --[[-----------------------------------------------------------------------------
207 Constructor 211 Constructor