Interrupt / delve-framework

Delve is a framework for writing Games in Zig and Lua. For those who value being cross platform and keeping things simple.
MIT License
210 stars 11 forks source link

Custom console commands can be registered now #38

Closed Interrupt closed 3 months ago

Interrupt commented 3 months ago

This adds a new function under delve.debug that lets modules add new console commands.

This can be used like:

pub fn helloCmd(args: []const u8) void {
    delve.debug.log("Hello world!", .{});
}
...
delve.debug.registerConsoleCommand(.{ .command = "hello", .func = helloCmd, .help = "Prints hello world" });

Registered commands also show in the console when the help command is used