I'm trying to create a new "custom" profession to play around with, much like the current blacksmithing one:
This is what I have so far:
Unfortunately, the problem I am currently having is that I am trying to produce an array of FontStrings, and use them to effectively act as the recipes and categories of the new profession. However, depending on their size, I can't seem to get them all to be left aligned, as in starting from the same place as they are all aligned in the center?
Code:
AddRecipe = function(name, req1, req2, req3, req4, type)
if type == "CATAGORY" then
elseif type == "RECIPE" then
EBGUI_TOPLEFT.NUMBERTOCREATE2 = EBGUI_TOPRIGHT:CreateFontString()
EBGUI_TOPLEFT.NUMBERTOCREATE2:SetPoint("LEFT", EBGUI_TOPLEFT, BaseTextPoint_X + NumberOfRecipes, BaseTextPoint_Y - (NumberOfRecipes * 15))
EBGUI_TOPLEFT.NUMBERTOCREATE2:SetFontObject("GameFontWhite")
EBGUI_TOPLEFT.NUMBERTOCREATE2:SetText(name)
EBGUI_TOPLEFT.NUMBERTOCREATE2:SetSize(500,50)
NumberOfRecipes = NumberOfRecipes + 1
end
end
AddRecipe("Test1", 0, 0, 0, 0, "RECIPE")
AddRecipe("Test-2", 0, 0, 0, 0, "RECIPE")
AddRecipe("Test3.1415", 0, 0, 0, 0, "RECIPE")
AddRecipe("TEST THE FOURTH", 0, 0, 0, 0, "RECIPE")
Firstly, I'm fairly weak with XML, so a LUA example would definately be prefable! I'm wondering if there is any way to make the FontStrings left-aligned so they can be added much more easily!
Sorry for the bad english and thanks!