View Single Post
01/05/17, 09:39 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Nice writeup. Two small additions:
You don't need to pass the stringId as a string, unless you want to use the second argument to GetString:

Lua Code:
  1. GetString("SI_ITEMTYPE0") -- works
  2. GetString(SI_ITEMTYPE0) -- works
  3. GetString(SI_ITEMTYPE, ITEMTYPE_NONE) -- doesn't work
  4. GetString("SI_ITEMTYPE", ITEMTYPE_NONE) -- works

You can directly assign the stringId in LAM since a few versions ago:
Lua Code:
  1. --LAM optionsPanel array
  2.     local optionsPanel = {
  3.            {
  4.                 type = 'header',
  5.                 name = SI_WINDOW_TITLE_GRAPHICS_OPTIONS,
  6.             },
  7.     ...
  8.     }
  Reply With Quote