diff --git a/assets/backgrounds/default_background.png b/assets/backgrounds/default_background.png new file mode 100644 index 00000000..63312aab Binary files /dev/null and b/assets/backgrounds/default_background.png differ diff --git a/src/gui/windows/pause.zig b/src/gui/windows/pause.zig index b15df31c..e968cc08 100644 --- a/src/gui/windows/pause.zig +++ b/src/gui/windows/pause.zig @@ -32,7 +32,7 @@ pub fn onOpen() void { } list.add(Button.initText(.{0, 0}, 128, "Settings", gui.openWindowCallback("settings"))); list.add(Button.initText(.{0, 0}, 128, "Reorder HUD", .{.callback = &reorderHudCallbackFunction})); - list.add(Button.initText(.{0, 0}, 128, "Exit to Menu TODO", .{ + list.add(Button.initText(.{0, 0}, 128, "Exit World", .{ .callback = &exitMenuCallbackFunction, })); list.finish(.center); diff --git a/src/gui/windows/save_selection.zig b/src/gui/windows/save_selection.zig index 1d729c1c..54ef82f6 100644 --- a/src/gui/windows/save_selection.zig +++ b/src/gui/windows/save_selection.zig @@ -137,8 +137,8 @@ pub fn update() void { pub fn onOpen() void { buttonNameArena = main.utils.NeverFailingArenaAllocator.init(main.globalAllocator); const list = VerticalList.init(.{padding, 16 + padding}, 300, 8); - list.add(Button.initText(.{0, 0}, 128, "Create World", gui.openWindowCallback("save_creation"))); - + list.add(Label.init(.{0, 0}, width, "**Select World**", .center)); + list.add(Button.initText(.{0, 0}, 128, "Create New World", gui.openWindowCallback("save_creation"))); readingSaves: { var dir = std.fs.cwd().makeOpenPath("saves", .{.iterate = true}) catch |err| { list.add(Label.init(.{0, 0}, 128, "Encountered error while trying to open saves folder:", .center)); @@ -159,7 +159,7 @@ pub fn onOpen() void { const decodedName = parseEscapedFolderName(main.stackAllocator, entry.name); defer main.stackAllocator.free(decodedName); const name = buttonNameArena.allocator().dupeZ(u8, entry.name); // Null terminate, so we can later recover the string from just the pointer. - const buttonName = std.fmt.allocPrint(buttonNameArena.allocator().allocator, "Play {s}", .{decodedName}) catch unreachable; + const buttonName = std.fmt.allocPrint(buttonNameArena.allocator().allocator, "{s}", .{decodedName}) catch unreachable; row.add(Button.initText(.{0, 0}, 128, buttonName, .{.callback = &openWorldWrap, .arg = @intFromPtr(name.ptr)})); row.add(Button.initIcon(.{8, 0}, .{16, 16}, fileExplorerIcon, false, .{.callback = &openFolder, .arg = @intFromPtr(name.ptr)})); @@ -169,7 +169,7 @@ pub fn onOpen() void { } } } - + list.finish(.center); window.rootComponent = list.toComponent(); window.contentSize = window.rootComponent.?.pos() + window.rootComponent.?.size() + @as(Vec2f, @splat(padding));