2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-06-30 19:03:42 -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 0727eda0bf
commit 3c747fa18d
6 changed files with 43 additions and 101 deletions

View File

@ -1,35 +1,11 @@
using System;
using System.IO;
using Raylib;
using static Raylib.Raylib;

namespace Test.NetCore
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Welcome to raylib-cs!");
var dir = Environment.CurrentDirectory;
while (true)
{
Console.WriteLine("Select raylib example(core/core_2d_camera)");
var filePath = Console.ReadLine();;
Console.WriteLine("Running example " + filePath + "...");
dir = Directory.GetParent(dir).FullName;
dir = Directory.GetParent(dir).FullName;
dir = Directory.GetParent(dir).FullName;
dir = Directory.GetParent(dir).FullName;
dir += "\\Examples\\";
var folder = dir + Path.GetDirectoryName(filePath);
ChangeDirectory(folder);
Type.GetType(filePath)?.GetMethod("Main")?.Invoke(null, args);
Console.WriteLine();
}
Examples.Test.Run(args);
}
}
}