From 6c725ff1e146cc78598b89103d182c5c734739c3 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Wed, 18 Mar 2026 16:47:37 +0100 Subject: [PATCH] paint: show packed label in 2d view --- paint/sources/ui_view2d.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/paint/sources/ui_view2d.c b/paint/sources/ui_view2d.c index ce48f60f..1de52d83 100644 --- a/paint/sources/ui_view2d.c +++ b/paint/sources/ui_view2d.c @@ -395,15 +395,26 @@ void ui_view2d_render(void *_) { ui->_y = 2 + start_y; } - char *view_type = ui_view2d_type == VIEW_2D_TYPE_ASSET ? "Asset" - : ui_view2d_type == VIEW_2D_TYPE_NODE ? "Node" - : ui_view2d_type == VIEW_2D_TYPE_FONT ? "Font" - : "Layer"; + char *view_type = ui_view2d_type == VIEW_2D_TYPE_ASSET ? tr("Asset") + : ui_view2d_type == VIEW_2D_TYPE_NODE ? tr("Node") + : ui_view2d_type == VIEW_2D_TYPE_FONT ? tr("Font") + : tr("Layer"); + ui->_w = math_floor(ew * 0.5 + 3); ui_text(view_type, UI_ALIGN_LEFT, 0x00000000); ui->_x += ew * 0.5 + 3; ui->_y = 2 + start_y; + if (ui_view2d_type == VIEW_2D_TYPE_ASSET) { + asset_t *asset = context_raw->texture; + bool is_packed = project_raw->packed_assets != NULL && project_packed_asset_exists(project_raw->packed_assets, asset->file); + if (is_packed) { + ui_text(tr("(packed)"), UI_ALIGN_LEFT, 0x00000000); + ui->_x += ew * 0.5 + 3; + ui->_y = 2 + start_y; + } + } + ui->enabled = true; }