diff --git a/Source/Examples/ExampleAttribute.cs b/Source/Examples/ExampleAttribute.cs index e43de3fe..20f2c6ae 100644 --- a/Source/Examples/ExampleAttribute.cs +++ b/Source/Examples/ExampleAttribute.cs @@ -19,12 +19,11 @@ namespace Examples public readonly int Difficulty; public readonly bool Visible = true; + public ExampleAttribute(string title, ExampleCategory category) + : this(title, category, 0, true) { } + public ExampleAttribute(string title, ExampleCategory category, int difficulty) - { - this.Title = title; - this.Category = category; - this.Difficulty = difficulty; - } + : this(title, category, difficulty, true) { } public ExampleAttribute(string title, ExampleCategory category, int difficulty, bool visible) { @@ -36,17 +35,20 @@ namespace Examples public override string ToString() { - return String.Format("{0} {1}: {2}", Category, Difficulty, Title); + if (Difficulty != 0) + return String.Format("{0} {1}: {2}", Category, Difficulty, Title); + return String.Format("{0}: {1}", Category, Title); } } public enum ExampleCategory { - OpenGL, + OpenGL = 0, OpenAL, Tutorial, GLSL, WinForms, Test, + Last } }