cached image loading

This commit is contained in:
galister
2025-12-27 22:06:28 +09:00
parent f4545241df
commit 8747487beb
8 changed files with 126 additions and 41 deletions

View File

@@ -4,7 +4,7 @@ use wgui::{
globals::WguiGlobals,
i18n::Translation,
layout::{Layout, WidgetID},
renderer_vk::text::custom_glyph::{CustomGlyphContent, CustomGlyphData},
renderer_vk::text::custom_glyph::CustomGlyphData,
taffy::{self, prelude::length},
widget::{
label::{WidgetLabel, WidgetLabelParams},
@@ -62,7 +62,7 @@ pub fn mount_simple_sprite_square(
layout.add_child(
parent_id,
WidgetSprite::create(WidgetSpriteParams {
glyph_data: Some(CustomGlyphData::new(CustomGlyphContent::from_assets(globals, path)?)),
glyph_data: Some(CustomGlyphData::from_assets(globals, path)?),
..Default::default()
}),
taffy::Style {