View Single Post
04/05/14, 11:42 AM   #7
Wukar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 27
Ok, raised an UI error previously - messed up syntax. But now i see neither an error, nor an added editbox...

Code:
function BBS_Initialize()
	local backpack = ZO_PlayerInventoryBackpack
	local wm = WINDOW_MANAGER
	local inv = ZO_PlayerInventory

	local editbox = wm:CreateControl("BBS_ToplevelTest", inv, CT_EDITBOX)
	editbox:SetParent(inv)
	editbox:SetAnchor(TOPLEFT, inv, TOPLEFT, 0, 10)
	editbox:SetResizeToFitDescendents(true)
	editbox:SetWidth(510)
	editbox:SetMouseEnabled(true)
end


-- Hook initialization onto the EVENT_ADD_ON_LOADED listener
EVENT_MANAGER:RegisterForEvent(EVENT_ADD_ON_LOADED, BBS_Initialize())

Last edited by Wukar : 04/05/14 at 11:52 AM. Reason: Fixed event registration
  Reply With Quote