2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-09-09 03:01:41 -04:00

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:
2018-10-23 17:13:25 +01:00
parent 02949091d3
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();
}
}
}
}