AbysmalCore Icon

forthebadge forthebadge

AbysmalCore

AbysmalCore is the standard library with utilities, debugging suite and GUI system that all my future apps will use.


AbysmalCore.Extensibility

AbysmalCore.Extensibility

A clean and uniform framework for runtime compilation and reflection of C# source files.

Example

// compile the assembly and get the test class
Assembly testAssembly = ExtensibilityHelper.CompileAssembly(File.ReadAllText(".\\ExtensibilityTest.cs"));
var asm = new UniformAssembly(testAssembly, true);

if (asm.HasClass("Tests.ExtensibilityTest"))
{
    var cls = asm.GetClass("Tests.ExtensibilityTest")!;
    string? output = null;

    if (cls.HasMethod("TestWith1Arg")) 
        output = cls.GetMethod("TestWith1Arg")!.Invoke<string>("Hello!");

    AbysmalDebug.Log(cls, output ?? "error!", true);
}
Tip

There is a guide available on how to use AbysmalCore.Extensibility here


AbysmalCore.Debugging

AbysmalCore.Debugging

A standardized, opinionated formatter for console logging and error throwing.

Example

int layerDivisor = 3;
int coreDivisor = 5;

Color layer = new(c.R / layerDivisor, c.G / layerDivisor, c.B / layerDivisor);
AbysmalDebug.Log(this, $"Generated layer color {layer} from {c}");
Color core = new(c.R / coreDivisor, c.G / coreDivisor, c.B / coreDivisor);
AbysmalDebug.Log(this, $"Generated base color {core} from {c}");
Tip

There is a guide available on how to use AbysmalCore.Debugging here


AbysmalCore.UI

AbysmalCore.UI

A standardized, opinionated design for Graphical User Interfaces (GUIs) based off raylib.

Example

Window w = new(new(500, 500), typeof(Window).FullName!);
UserInterface ui = new()
{
    Elements =
    {
        new Button("hello!", new(10,10))
        {
            Name = "btn",
            StyleMap = new(true)
        }
    }
};
ui.GetElement("btn")?.OnClicked += (UIElement sender, Vector2Int mouse, int frame) =>
{
    AbysmalDebug.Log(sender, $"Clicked on frame {frame}!");
};

w.Init(ui);
Tip

There is a guide available on how to use AbysmalCore.UI here