• 0

    posted a message on AceGUI-3.0 ScrollingMessageFrame
    By reading the previous thread SimpleHTML i thought to make another widget using ScrollingMessageFrame but something was wrong in my code, can u help me?


    -----------------------------------------------------
    -- HELP WIDGET
    ----------------------------------------------------- 
    do
    	local Type = "ScrollingMessageFrame"
    	local Version = 8
    	local function OnAcquire(self)
    		self:SetText("Default")
    	end
    	local function OnRelease(self)
    		self.frame:ClearAllPoints()
    		self.frame:Hide()
    	end
    	local function SetText(self, text)
    		self.frame:AddMessage(text or "Default")
    	end
    	local function SetWidth(self, w)
    		self.frame:SetWidth(w)
    	end
    	local function Constructor()
    		local frame = CreateFrame("ScrollingMessageFrame",nil,UIParent)
    		local self = {}
    		self.type = Type
    		self.OnRelease = OnRelease
    		self.OnAcquire = OnAcquire
    		self.SetText = SetText
    		self.SetWidth = SetWidth
    		self.frame = frame
    		frame.obj = self
    		frame:SetHeight(20)
    		frame:SetWidth(200)
    		frame:SetFontObject(GameFontHighlightSmall)
    		AceGUI:RegisterAsWidget(self)
    		return self
    	end
    	AceGUI:RegisterWidgetType(Type,Constructor,Version) 
    end
    
    -------------------------------------------------------------
    
    local f = AceGUI:Create("Frame")
    f:SetCallback("OnClose",function(widget) AceGUI:Release(widget) end)
    f:SetTitle("LootLogAce")
    f:SetStatusText("Status Bar")
    f:SetLayout("Flow")
    
    local sst= AceGUI:Create("ScrollingMessageFrame")
    	sst:SetWidth(174)
    	v:SetText("default")
    	f:AddChild(sst)
    Posted in: Ace3
  • To post a comment, please or register a new account.