Fix 2d view zoom label

This commit is contained in:
luboslenco
2025-11-22 12:56:01 +01:00
parent fbe424fa29
commit 98a9b3601d
+4 -2
View File
@@ -382,8 +382,10 @@ function ui_view2d_render() {
ui._x += ew * 0.5 + 3;
ui._y = 2 + start_y;
let scale_percent: i32 = math_round((tw / tex.width) * 100);
ui_text(scale_percent + "%");
if (tex != null) {
let scale_percent: i32 = math_round((tw / tex.width) * 100);
ui_text(scale_percent + "%");
}
ui.enabled = true;