Commit d8c9354c authored by nevcairiel's avatar nevcairiel
Browse files

AceGUI-3.0: Add SetMaxLetters APIs to EB and MLEB (Ticket #135)

git-svn-id: https://repos.wowace.com/wow/ace3/trunk@948 5debad98-a965-4143-8383-f471b3509dcf
parent 18955824
--[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "EditBox", 20
local Type, Version = "EditBox", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
......@@ -120,6 +120,7 @@ local methods = {
self:SetLabel()
self:SetText()
self:DisableButton(false)
self:SetMaxLetters(0)
end,
-- ["OnRelease"] = nil,
......@@ -163,6 +164,10 @@ local methods = {
["DisableButton"] = function(self, disabled)
self.disablebutton = disabled
end,
["SetMaxLetters"] = function (self, num)
self.editbox:SetMaxLetters(num or 0)
end
}
......
local Type, Version = "MultiLineEditBox", 20
local Type, Version = "MultiLineEditBox", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
......@@ -123,6 +123,7 @@ local methods = {
self:SetWidth(200)
self:SetNumLines()
self.entered = nil
self:SetMaxLetters(0)
end,
["OnRelease"] = function(self)
......@@ -173,6 +174,10 @@ local methods = {
["SetText"] = function(self, text)
self.editBox:SetText(text)
end,
["SetMaxLetters"] = function (self, num)
self.editbox:SetMaxLetters(num or 0)
end
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment