Watch
2
0
Fork
You've already forked raylib-cs
0

Moved example menu

- Menu for example removed from Test projects and moved to exampes.
- Changed nativeLibName from raylib.dll to raylib. It should find the correct one this way but might need a dll.config file.
This commit is contained in:
ChrisDill 2018-10-23 17:13:25 +01:00
commit 3ea345851a
6 changed files with 43 additions and 101 deletions

30
Examples/Test.cs Normal file
View file

@ -0,0 +1,30 @@
using System;
using System.IO;
using static Raylib.Raylib;
namespace Examples
{
public class Test
{
// menu for testing examples
public static void Run(string[] args)
{
Console.WriteLine("Welcome to raylib-cs!");
while (true)
{
Console.WriteLine("Enter path to example");
var filePath = Console.ReadLine();
var name = Path.GetFileNameWithoutExtension(filePath);
Console.WriteLine("Running example " + filePath);
ChangeDirectory(filePath);
Type.GetType(name)?.GetMethod("Main")?.Invoke(null, args);
Console.WriteLine();
}
}
}
}