private void AppendGUIsToHeader(StringBuilder sb, IList<GUI> guis)
{
if (guis.Count > 0)
{
sb.AppendLine("import GUI gui[" + guis.Count + "];");
foreach (GUI gui in guis)
{
if (gui.Name.Length == 0)
{
continue;
}
sb.AppendLine("import GUI " + gui.Name + ";");
if (gui.Name.StartsWith("g"))
{
string guiMacroName = gui.Name.Substring(1).ToUpper();
sb.AppendLine(string.Format("#define {0} FindGUIID(\"{1}\")", guiMacroName, guiMacroName));
}
foreach (GUIControl control in gui.Controls)
{
if (control.Name.Length > 0)
{
sb.AppendLine("import " + control.ScriptClassType + " " + control.Name + ";");
}
}
}
}
}