Dynamic Windows

From Legends of Aria Admin and Modding Wiki
Revision as of 04:29, 29 October 2016 by Kade CS (talk | contribs)
Jump to: navigation, search

These are made to be copy paste ready, leaving in the comments is strongly recommended. If you don't need all the parameters do this:

local dynamicWindow = DynamicWindow(
	"MyWindow", --(string) Window ID used to uniquely identify the window. It is returned in the DynamicWindowResponse event.
	"My Window, --(string) Title of the window for the client UI
	100, --(number) Width of the window
	100 --(number) Height of the window
	--startX, --(number) Starting X position of the window (chosen by client if not specified)
	--startY, --(number) Starting Y position of the window (chosen by client if not specified)
	--windowType, --(string) Window type (optional)
	--windowAnchor --(string) Window anchor (default "TopLeft")
)

Please notice after the height parameter the comma was removed, this is crucial or you will receive a Lua error similar to unexpected symbol near ')'

Setting a (number) to 0 or (string) to "" is the same as not setting it.

DynamicWindow

DynamicWindow(
	windowId, --(string) Window ID used to uniquely identify the window. It is returned in the DynamicWindowResponse event.
	title, --(string) Title of the window for the client UI
	width, --(number) Width of the window
	height, --(number) Height of the window
	startX, --(number) Starting X position of the window (chosen by client if not specified)
	startY, --(number) Starting Y position of the window (chosen by client if not specified)
	windowType, --(string) Window type (optional)
	windowAnchor --(string) Window anchor (default "TopLeft")
)

WindowAnchor options

  • Top
  • TopLeft
  • TopRight
  • Bottom
  • BottomLeft
  • BottomRight
  • Left
  • Right
  • Center

WindowType options

  • Default
  • Transparent
  • NoFrame
  • SemiTransparent
  • TriplePane
  • TransparentCloseButton
  • DefaultLongTitle

DynamicWindow:AddImage

dynamicWindow:AddImage(
	x, --(number) x position in pixels on the window
	y, --(number) y position in pixels on the window
	spriteName, --(string) sprite name
	width, --(number) width of the image
	height, --(number) height of the image
	spriteType, --(string) sprite type Simple, Sliced or Object (defaults to Simple)
	spriteHue, --(string) sprite hue (defaults to white)
	opacity --(number) (default 1.0)
)

DynamicWindow:AddLabel

dynamicWindow:AddLabel(
	x, --(number) x position in pixels on the window
	y, --(number) y position in pixels on the window
	text, --(string) text in the label
	width, --(number) width of the text for wrapping purposes (defaults to width of text)
	height, --(number) height of the label (defaults to unlimited, text is not clipped)
	fontSize, --(number) font size (default specific to client)
	alignment, --(string) alignment "left", "center", or "right" (default "left")
	scrollable, --(boolean) scrollable (default false)
	outline, --(boolean) outline (defaults to false)
	font --(string) name of font on client (optional)
)

Fonts

  • PermianSlabSerifBold_24
  • Kingthings_18
  • PermianSlabSerif_16_Dynamic