Thread Tools Display Modes
Prev Previous Post   Next Post Next
05/05/15, 03:40 AM   #1
Glen348
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 11
want to remove XML file

im looking for a way to remove the xml file and make it work in lua only any ideals?
Lua Code:
  1. local function CreateIndexButton(indexPool)
  2.     local button = ZO_ObjectPool_CreateControl("NotebookIndex", indexPool, notebook.toc.scrollChild)
  3.     local anchorBtn = buttonCount == 1 and notebook.toc.scrollChild or indexPool:AcquireObject(buttonCount-1)
  4.         button:SetAnchor(TOPLEFT, anchorBtn, buttonCount == 1 and TOPLEFT or BOTTOMLEFT)
  5.         button:SetHorizontalAlignment(TEXT_ALIGN_LEFT)     
  6.         button:SetFont("ZoFontBookPaper")      
  7.         button:SetWidth(400)
  8.         button:SetNormalFontColor(0, 0, 0, 0.7)
  9.         button:SetPressedFontColor(0, 0, 0, 0.9)
  10.         button:SetMouseOverFontColor(0, 0, 0, 0.4)
  11.         button:SetClickSound() 
  12.         button:SetHandler("OnClicked", function(self)
  13.             currentlyViewing = self.id
  14.             notebook.titleEdit:SetText(UnprotectText(self.data.title))
  15.             notebook.edit:SetText(UnprotectText(self.data.text))
  16.             notebook.selectedpage:ClearAnchors()
  17.             notebook.selectedpage:SetAnchorFill(self)
  18.             PlaySound(SOUNDS.BOOK_PAGE_TURN)           
  19.         end)
  20.     buttonCount = buttonCount + 1
  21.     return button
  22. end
  23.  
  24.     PopulateScrollList()
  25.         if self.new then
  26.             notebook.selectedpage:SetAnchorFill(_G["NotebookIndex"..currentlyViewing])
  27.         end

Code:
<GuiXml>
	<Controls>
		<Button name="NotebookIndex" virtual="true" inherits="ZO_DefaultTextButton">
		</Button>
	</Controls>
</GuiXml>

Last edited by Glen348 : 05/06/15 at 01:16 AM.
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » want to remove XML file


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off