From 268bcd38a8ac7fb5793d2d3f3f4efd0801990493 Mon Sep 17 00:00:00 2001 From: AndreasSasDev Date: Thu, 9 May 2024 14:47:10 +0200 Subject: [PATCH] Fix for Examples.Logging by importing the nuget package --- Examples.Logging/CustomSerilogLogging.cs | 18 +++++++++--------- Examples.Logging/Examples.Logging.csproj | 16 ++++------------ 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/Examples.Logging/CustomSerilogLogging.cs b/Examples.Logging/CustomSerilogLogging.cs index 19ab074..a31fa1a 100644 --- a/Examples.Logging/CustomSerilogLogging.cs +++ b/Examples.Logging/CustomSerilogLogging.cs @@ -1,7 +1,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Raylib_cs; using Serilog; -using static Raylib_cs.Raylib; namespace Examples.Logging; @@ -29,7 +29,7 @@ public static class CustomSerilogLogging // Attach Logger to callback //-------------------------------------------------------------------------------------- unsafe { - SetTraceLogCallback(GetPointer()); + Raylib.SetTraceLogCallback(GetPointer()); } Logger.Information("Logger has been set to Raylib-cs TraceLogCallback"); @@ -39,25 +39,25 @@ public static class CustomSerilogLogging const int screenWidth = 800; const int screenHeight = 450; - InitWindow(screenWidth, screenHeight, "raylib custom Logger example - basic window"); + Raylib.InitWindow(screenWidth, screenHeight, "raylib custom Logger example - basic window"); // Main game loop - while (!WindowShouldClose()) + while (!Raylib.WindowShouldClose()) { // Draw //---------------------------------------------------------------------------------- - BeginDrawing(); - ClearBackground(Color.RayWhite); + Raylib.BeginDrawing(); + Raylib.ClearBackground(Color.RayWhite); - DrawText("Hello World!", 190, 200, 20, Color.Black); + Raylib.DrawText("Hello World!", 190, 200, 20, Color.Black); - EndDrawing(); + Raylib.EndDrawing(); //---------------------------------------------------------------------------------- } // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); + Raylib.CloseWindow(); //-------------------------------------------------------------------------------------- return 0; diff --git a/Examples.Logging/Examples.Logging.csproj b/Examples.Logging/Examples.Logging.csproj index 3b9cf63..cb10660 100644 --- a/Examples.Logging/Examples.Logging.csproj +++ b/Examples.Logging/Examples.Logging.csproj @@ -8,21 +8,13 @@ enable - - - - - - - - - - - + + - + +