44 lines
1.1 KiB
Zig
44 lines
1.1 KiB
Zig
allocator: std.mem.Allocator = undefined,
|
|
|
|
selectedObjectToSpawn: ?core.Name = null,
|
|
|
|
spawnedObjects: std.ArrayListUnmanaged(core.Entity) = .{},
|
|
|
|
pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "extras.gameManagerUI");
|
|
|
|
pub fn create(allocator: std.mem.Allocator) !*@This() {
|
|
const self = try allocator.create(@This());
|
|
|
|
self.* = .{ .allocator = allocator };
|
|
|
|
if (core.getEngineObject(igu.TopBar)) |topbar| {
|
|
topbar.addMenuObject(self, "Game Manager") catch {};
|
|
}
|
|
|
|
core.engine_log("why is this not spawning", .{});
|
|
|
|
return self;
|
|
}
|
|
|
|
pub fn objectReload(self: *@This()) void {
|
|
_ = self;
|
|
}
|
|
|
|
pub fn windowOpen(entry: *igu.MenuEntry, dt: f64) void {
|
|
const self: *@This() = @ptrCast(@alignCast(entry.ctx));
|
|
_ = self;
|
|
_ = dt;
|
|
}
|
|
|
|
pub fn destroy(self: *@This()) void {
|
|
self.spawnedObjects.deinit(self.allocator);
|
|
self.allocator.destroy(self);
|
|
}
|
|
|
|
const backlog = @import("Backlog");
|
|
const core = backlog.core;
|
|
const rend = backlog.rend;
|
|
const ig = backlog.imgui.api;
|
|
const igu = backlog.imgui.utils;
|
|
const std = @import("std");
|