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();
 }
示例#2
0
        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();
        }