View Single Post
10/31/14, 07:01 AM   #1
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Something Similar to a Chat Window

Are there any xml controls you can inherit from to create something similar to a chat window that handles scrolling, resizing, maxHistoryLines, & link mouse clicks ect... without having to write that stuff yourself?

I don't need it to receive or send chat messages I was just wanting something I could easily make with little code to add debug messages to, with a scrollable window, & clickable links.

If it helps I was hoping to do something simple like this:
xml Code:
  1. <GuiXml>
  2.  <Controls>
  3.    <TopLevelControl name="MyDebugWindow" inherits="ZO_ChatContainerTemplate" resizeHandleSize="8" clampedToScreen="true" mouseEnabled="true" movable="true" hidden="false" layer="OVERLAY" tier="HIGH" allowBringToTop="false" alpha="1" >
  4.        <Dimensions x="200" y="400" />
  5.       <Anchor point="TOPELFT" relativeTo="GuiRoot" relativePoint="TOPELFT" offsetX="750" offsetY="150"/>
  6.       <Controls>
  7.          <TextBuffer name="$(parent)TextBuffer" font="ZoFontChat" layer="OVERLAY" tier="LOW" level="0" maxHistoryLines="200" mouseEnabled="true" movable="true" >
  8.          <AnchorFill/>
  9.          <LineFade fadeBegin="0" fadeDuration="0" />
  10.          </TextBuffer>
  11.       </Controls>
  12.    </TopLevelControl>
  13.  </Controls>
  14. </GuiXml>

and then just add messages to the textBuffer:
Lua Code:
  1. MyDebugWindowTextBuffer:AddMessage("Some debug message")
  Reply With Quote