Skip to content

Commit 52335e3

Browse files
committed
Fixes to namespace
1 parent fddcea3 commit 52335e3

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.name = .engine,
33
.version = "0.16.1",
44
.fingerprint = 0xe8a81a8d0aa558d5,
5-
.minimum_zig_version = "0.16.0",
5+
.minimum_zig_version = "0.16.1",
66
.dependencies = .{
77
.resources = .{
88
.url = "git+https://github.com/loftafi/resources.git#fba5770e1c2c9d9ac0c665421ae3d8cc8eecaeb0",

src/engine.zig

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,6 +2369,8 @@ pub const Error = error{
23692369
RootAcceptsPanelsOnly,
23702370
};
23712371

2372+
/// Holdes references to the currently loaded fonts in use for each
2373+
/// language. By default, every language uses the first loaded font.
23722374
pub const LanguageFont = struct {
23732375
default: *Font,
23742376
english: *Font,
@@ -2377,7 +2379,8 @@ pub const LanguageFont = struct {
23772379
chinese: *Font,
23782380
};
23792381

2380-
pub const SurfaceInfo = struct {
2382+
/// Holds the raw image data after it is decoded from a resource bundle.
2383+
const SurfaceInfo = struct {
23812384
buffer: []const u8,
23822385
img: zstbi.Image,
23832386
surface: *sdl.SDL_Surface,
@@ -2551,7 +2554,7 @@ pub inline fn alert(comptime format: []const u8, args: anytype) void {
25512554
/// that requires immediate action/intervention.
25522555
/// Zig also does not distinguish between a general info log message and an
25532556
/// info `notice` that might require immediate action.
2554-
pub const LogLevel = enum {
2557+
const LogLevel = enum {
25552558
trace,
25562559
debug,
25572560
info,

src/entity.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// Describe an entity that will be rendered on the screen during a draw
2-
/// loop. See `EntityType` for the types of entities that may be rendered.
2+
/// loop. See `Type` for the types of entities that may be rendered.
33
pub fn Entity(comptime T: type) type {
44
return struct {
55
pub const Self = @This();
@@ -79,7 +79,7 @@ pub fn Entity(comptime T: type) type {
7979
on_resized: Self.BoolCallback = .empty,
8080
on_visibility: Self.Callback = .empty,
8181

82-
type: union(EntityType) {
82+
type: union(Type) {
8383
button: Button(T),
8484
checkbox: Checkbox(T),
8585
expander: Expander(T),
@@ -2432,7 +2432,7 @@ pub const ToggleState = enum {
24322432
};
24332433

24342434
/// Describe the type of each entity in the elment tree.
2435-
pub const EntityType = enum {
2435+
pub const Type = enum {
24362436
button,
24372437
checkbox,
24382438
expander,

0 commit comments

Comments
 (0)