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
b45544c97a
commit
1eda05b7b3
14 changed files with 236 additions and 98 deletions
|
|
@ -8,6 +8,7 @@ const Bridge = @import("bridge.zig");
|
|||
const Fs = @import("fs.zig");
|
||||
const Input = @import("input.zig");
|
||||
const Api = @import("api.zig");
|
||||
const View = @import("view.zig");
|
||||
|
||||
const gpa = std.heap.c_allocator;
|
||||
|
||||
|
|
@ -69,6 +70,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| {
|
||||
|
|
@ -76,6 +82,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