mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-09 07:50:37 +00:00
Make ExampleAttribute.Visible a named parameter, that is true by default (even for test examples).
This commit is contained in:
parent
72704daa9c
commit
1b1c4fda67
|
@ -14,10 +14,11 @@ namespace Examples
|
||||||
public class ExampleAttribute : System.Attribute
|
public class ExampleAttribute : System.Attribute
|
||||||
{
|
{
|
||||||
string title;
|
string title;
|
||||||
|
bool visible = true;
|
||||||
public string Title { get { return title; } internal set { title = value; } }
|
public string Title { get { return title; } internal set { title = value; } }
|
||||||
public readonly ExampleCategory Category;
|
public readonly ExampleCategory Category;
|
||||||
public readonly int Difficulty;
|
public readonly int Difficulty;
|
||||||
public readonly bool Visible = true;
|
public bool Visible { get { return visible; } set { visible = value; } }
|
||||||
|
|
||||||
public ExampleAttribute(string title, ExampleCategory category)
|
public ExampleAttribute(string title, ExampleCategory category)
|
||||||
: this(title, category, 0, true) { }
|
: this(title, category, 0, true) { }
|
||||||
|
|
|
@ -108,7 +108,7 @@ namespace Examples
|
||||||
////sb.Append(type.Name);
|
////sb.Append(type.Name);
|
||||||
//sb.Append(example.Title);
|
//sb.Append(example.Title);
|
||||||
|
|
||||||
if (example.Visible && example.Category != ExampleCategory.Test)
|
if (example.Visible)
|
||||||
listBox1.Items.Add(new ExampleInfo(type, example));
|
listBox1.Items.Add(new ExampleInfo(type, example));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@ using OpenTK.Input;
|
||||||
|
|
||||||
namespace Examples.Tests
|
namespace Examples.Tests
|
||||||
{
|
{
|
||||||
[Example("GameWindow states.", ExampleCategory.Test)]
|
[Example("GameWindow states", ExampleCategory.Test)]
|
||||||
public class GameWindowStates : GameWindow
|
public class GameWindowStates : GameWindow
|
||||||
{
|
{
|
||||||
TextureFont font = new TextureFont(new Font(FontFamily.GenericSansSerif, 16.0f));
|
TextureFont font = new TextureFont(new Font(FontFamily.GenericSansSerif, 16.0f));
|
||||||
|
|
|
@ -12,7 +12,7 @@ using OpenTK.Math;
|
||||||
|
|
||||||
namespace Examples.Tests
|
namespace Examples.Tests
|
||||||
{
|
{
|
||||||
[Example("Math speed test", ExampleCategory.Test)]
|
[Example("Math speed test", ExampleCategory.Test, Visible = false)]
|
||||||
public class MathSpeed
|
public class MathSpeed
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
|
|
Loading…
Reference in a new issue