This method is called by Trainz to retrieve HTML which a player can use to configure the objects properties. Any embedded properties should use the live://property/propertyID format, all player readable strings should be sourced from the asset string-table, and all player configurable values should be appropriately escaped to avoid HTML corruption.
The Trainz uses its Mini Browser to display the HTML. See the MiniBrowser page to find supported HTML elements.
C#
public string GetDescriptionHTML(void)
{
StringTable strTable = GetAsset().GetStringTable();
HTMLBuffer buffer = HTMLBufferStatic.Construct();
buffer.Print("<html><body>");
buffer.Escape(strTable.GetString("property_name_forename"));
buffer.Print(": <a href=live://property/forename>");
buffer.Escape(m_foreName);
buffer.Print("</a><br>");
buffer.Escape(strTable.GetString("property_name_surname"));
buffer.Print(": <a href=live://property/forename>");
buffer.Escape(m_surName);
buffer.Print("</a><br>");
buffer.Print("</body></html>");
return buffer.AsString();
}
Display More