public void AddItem(string label, TPRollingTextOnSelect callback) { TPRollingTextMenuItem item = new TPRollingTextMenuItem(label, callback); item.Position.X = this.Position.X + TPEngine.Get().FontManager.LoadFont(@"fonts\testfont").MeasureString(item.ToString()).X / 4; item.Position.Y = this.Position.Y; m_MenuItemSet.Add(item); if (m_MenuItemSet.Count == 1) { m_Index = 0; } SetTargets(); }
public TPRollingTextMenuItem(string label, TPRollingTextOnSelect callback) : base(label, TPEngine.Get().FontManager.LoadFont(@"fonts\testfont_large")) { m_cbOnselect = callback; }