We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 956c95b commit 78d0649Copy full SHA for 78d0649
src/engine.zig
@@ -779,6 +779,8 @@ pub const Element = struct {
779
}
780
781
782
+ /// Replace the current image texture with a a texture from a resource
783
+ /// bundle. Returns null if the resource name does not exist.
784
pub inline fn set_image(
785
self: *Element,
786
gpa: Allocator,
@@ -794,6 +796,7 @@ pub const Element = struct {
794
796
795
797
const end = std.time.milliTimestamp();
798
debug("set_image loaded image named \"{s}\" in {d}ms", .{ name, end - start });
799
+ self.texture_name = name;
800
801
if (self.texture != null) {
802
display.release_texture_resource(gpa, self.texture.?);
0 commit comments