Пример #1
0
        public override void DrawLine(Scene scene, Vector2 linePos, int e)
        {
            ActAction       action = Actions[e];
            SpriteReference cursor = SpriteLoader.Instance.AddSprite("content/cursor");

            if (Selection == e)
            {
                scene.SpriteBatch.Draw(cursor.Texture, linePos + new Vector2(0, LineHeight / 2 - cursor.Width / 2), cursor.GetFrameRect(0), Color.White);
            }
            scene.DrawText(action.Name, linePos + new Vector2(16, 0), Alignment.Left, new TextParameters().SetConstraints(Width - 32, 16).SetBold(true).SetColor(Color.White, Color.Black));
            scene.DrawText(action.Description, linePos + new Vector2(16, 16), Alignment.Left, new TextParameters().SetConstraints(Width - 32, 16).SetBold(false).SetColor(Color.Gray, Color.Black));
        }
Пример #2
0
 public void AddDefault(ActAction action)
 {
     DefaultSelection = Actions.Count;
     Add(action);
 }
Пример #3
0
 public void Add(ActAction action)
 {
     Actions.Add(action);
 }