mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-08 04:57:32 -04:00
lua position, size, focus and z-index (not really)
This commit is contained in:
parent
2c130539f6
commit
47bcce621d
14 changed files with 236 additions and 98 deletions
|
|
@ -9,6 +9,7 @@ const Fs = @import("fs.zig");
|
|||
const Input = @import("input.zig");
|
||||
const Api = @import("api.zig");
|
||||
const Hook = @import("hook.zig");
|
||||
const View = @import("view.zig");
|
||||
|
||||
const gpa = std.heap.c_allocator;
|
||||
|
||||
|
|
@ -75,6 +76,11 @@ pub fn init(self: *Lua) !void {
|
|||
self.state.newLib(api_funcs);
|
||||
self.state.setField(-2, "api");
|
||||
}
|
||||
{
|
||||
const view_funcs = zlua.fnRegsFromType(View);
|
||||
self.state.newLib(view_funcs);
|
||||
self.state.setField(-2, "view");
|
||||
}
|
||||
}
|
||||
|
||||
loadRuntimeDir(self) catch |err| {
|
||||
|
|
@ -82,6 +88,7 @@ pub fn init(self: *Lua) !void {
|
|||
std.log.warn("{s}", .{try self.state.toString(-1)});
|
||||
}
|
||||
};
|
||||
|
||||
loadConfigDir(self) catch |err| {
|
||||
if (err == error.LuaRuntime) {
|
||||
std.log.warn("{s}", .{try self.state.toString(-1)});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue