34 lines
826 B
Zig
34 lines
826 B
Zig
const std = @import("std");
|
|
pub const core = @import("core");
|
|
const rend = @import("rend");
|
|
|
|
pub const papyrus = @import("papyrus");
|
|
|
|
pub const Module: core.ModuleDescription = .{
|
|
.name = "ui",
|
|
.enabledByDefault = true,
|
|
};
|
|
|
|
pub const PapyrusIntegration = @import("sgpu/papyrusSgpu.zig");
|
|
|
|
pub fn start_module(spec: *core.SpecVariantMap, args: anytype, allocator: std.mem.Allocator) !void {
|
|
_ = args;
|
|
_ = spec;
|
|
_ = allocator;
|
|
|
|
const ctx = try core.createObject(PapyrusIntegration, .{});
|
|
try ctx.setup();
|
|
}
|
|
|
|
// gets the main context
|
|
pub const context = core.EngineObject(PapyrusIntegration).get;
|
|
|
|
pub fn getScreen() *papyrus.Context {
|
|
return context().screenContext;
|
|
}
|
|
|
|
pub fn shutdown_module(allocator: std.mem.Allocator) void {
|
|
_ = allocator;
|
|
}
|
|
pub const ModernStyle = papyrus.ModernStyle;
|