This commit is contained in:
luboslenco
2024-11-08 23:46:39 +01:00
parent 909493e31e
commit 4cc4b0d069
46 changed files with 287 additions and 444 deletions
+12 -19
View File
@@ -80,8 +80,7 @@ function box_export_tab_export_textures(ui: ui_t, title: string, bake_material:
let tab_vertical: bool = config_raw.touch_ui;
if (ui_tab(box_export_htab, title, tab_vertical)) {
let row: f32[] = [0.5, 0.5];
ui_row(row);
ui_row2();
///if (arm_android || arm_ios)
let base_res_combo: string[] = ["128", "256", "512", "1K", "2K", "4K"];
@@ -105,7 +104,7 @@ function box_export_tab_export_textures(ui: ui_t, title: string, bake_material:
app_notify_on_init(base_set_layer_bits);
}
ui_row(row);
ui_row2();
if (base_bits_handle.position == texture_bits_t.BITS8) {
let h: ui_handle_t = ui_handle(__ID__);
if (h.init) {
@@ -135,7 +134,7 @@ function box_export_tab_export_textures(ui: ui_t, title: string, bake_material:
ui.enabled = true;
///if is_paint
ui_row(row);
ui_row2();
ui.enabled = !bake_material;
let layers_export_handle: ui_handle_t = ui_handle(__ID__);
layers_export_handle.position = context_raw.layers_export;
@@ -157,7 +156,7 @@ function box_export_tab_export_textures(ui: ui_t, title: string, bake_material:
_ui_end_element();
ui_row(row);
ui_row2();
if (ui_button(tr("Cancel"))) {
ui_box_hide();
}
@@ -208,8 +207,7 @@ function box_export_tab_presets(ui: ui_t) {
ui_box_show_custom(function (ui: ui_t) {
let tab_vertical: bool = config_raw.touch_ui;
if (ui_tab(ui_handle(__ID__), tr("New Preset"), tab_vertical)) {
let row: f32[] = [0.5, 0.5];
ui_row(row);
ui_row2();
let h_preset: ui_handle_t = ui_handle(__ID__);
if (h_preset.init) {
h_preset.text = "new_preset";
@@ -253,8 +251,7 @@ function box_export_tab_presets(ui: ui_t) {
// Texture list
ui_separator(10, false);
row = [1 / 6, 1 / 6, 1 / 6, 1 / 6, 1 / 6, 1 / 6];
ui_row(row);
ui_row6();
ui_text(tr("Texture"));
ui_text(tr("R"));
ui_text(tr("G"));
@@ -264,7 +261,7 @@ function box_export_tab_presets(ui: ui_t) {
ui.changed = false;
for (let i: i32 = 0; i < box_export_preset.textures.length; ++i) {
let t: export_preset_texture_t = box_export_preset.textures[i];
ui_row(row);
ui_row6();
let htex: ui_handle_t = ui_nest(box_export_hpreset, i);
htex.text = t.name;
t.name = ui_text_input(htex);
@@ -345,8 +342,7 @@ function box_export_tab_atlases(ui: ui_t) {
}
}
for (let i: i32 = 0; i < project_paint_objects.length; ++i) {
let row: f32[] = [1 / 2, 1 / 2];
ui_row(row);
ui_row2();
ui_text(project_paint_objects[i].base.name);
let hatlas: ui_handle_t = ui_nest(ui_handle(__ID__), i);
hatlas.position = project_atlas_objects[i];
@@ -367,8 +363,7 @@ function box_export_tab_export_mesh(ui: ui_t, htab: ui_handle_t) {
let tab_vertical: bool = config_raw.touch_ui;
if (ui_tab(htab, tr("Export Mesh"), tab_vertical)) {
let row: f32[] = [1 / 2, 1 / 2];
ui_row(row);
ui_row2();
let h_export_mesh_format: ui_handle_t = ui_handle(__ID__);
if (h_export_mesh_format.init) {
@@ -405,7 +400,7 @@ function box_export_tab_export_mesh(ui: ui_t, htab: ui_handle_t) {
}
ui_text(tris + " " + tr("triangles"));
ui_row(row);
ui_row2();
if (ui_button(tr("Cancel"))) {
ui_box_hide();
}
@@ -451,8 +446,7 @@ function box_export_show_material() {
h2.selected = context_raw.write_icon_on_export;
context_raw.pack_assets_on_export = ui_check(h1, tr("Pack Assets"));
context_raw.write_icon_on_export = ui_check(h2, tr("Export Icon"));
let row: f32[] = [0.5, 0.5];
ui_row(row);
ui_row2();
if (ui_button(tr("Cancel"))) {
ui_box_hide();
}
@@ -483,8 +477,7 @@ function box_export_show_brush() {
h2.selected = context_raw.write_icon_on_export;
context_raw.pack_assets_on_export = ui_check(h1, tr("Pack Assets"));
context_raw.write_icon_on_export = ui_check(h2, tr("Export Icon"));
let row: f32[] = [0.5, 0.5];
ui_row(row);
ui_row2();
if (ui_button(tr("Cancel"))) {
ui_box_hide();
}