paint: cleanup

This commit is contained in:
luboslenco
2026-03-15 11:37:45 +01:00
parent f2e53fd899
commit fdb88c3cc9
63 changed files with 904 additions and 900 deletions
+7 -7
View File
@@ -24,22 +24,22 @@ void tab_brushes_draw_context_menu() {
i32 i = _tab_brushes_draw_i;
// let b: slot_brush_t = brushes[i];
if (ui_menu_button(tr("Export", NULL), "", ICON_EXPORT)) {
if (ui_menu_button(tr("Export"), "", ICON_EXPORT)) {
context_select_brush(i);
box_export_show_brush();
}
if (ui_menu_button(tr("Duplicate", NULL), "", ICON_DUPLICATE)) {
if (ui_menu_button(tr("Duplicate"), "", ICON_DUPLICATE)) {
sys_notify_on_next_frame(&tab_brushes_draw_duplicate, NULL);
}
if (project_brushes->length > 1 && ui_menu_button(tr("Delete", NULL), "delete", ICON_DELETE)) {
if (project_brushes->length > 1 && ui_menu_button(tr("Delete"), "delete", ICON_DELETE)) {
tab_brushes_delete_brush(project_brushes->buffer[i]);
}
}
void tab_brushes_draw(ui_handle_t *htab) {
if (ui_tab(htab, tr("Brushes", NULL), false, -1, false)) {
if (ui_tab(htab, tr("Brushes"), false, -1, false)) {
ui_begin_sticky();
f32_array_t *row = f32_array_create_from_raw(
(f32[]){
@@ -49,16 +49,16 @@ void tab_brushes_draw(ui_handle_t *htab) {
},
3);
ui_row(row);
if (ui_icon_button(tr("New", NULL), ICON_PLUS, UI_ALIGN_CENTER)) {
if (ui_icon_button(tr("New"), ICON_PLUS, UI_ALIGN_CENTER)) {
context_raw->brush = slot_brush_create(NULL);
any_array_push(project_brushes, context_raw->brush);
make_material_parse_brush();
ui_nodes_hwnd->redraws = 2;
}
if (ui_icon_button(tr("Import", NULL), ICON_IMPORT, UI_ALIGN_CENTER)) {
if (ui_icon_button(tr("Import"), ICON_IMPORT, UI_ALIGN_CENTER)) {
project_import_brush();
}
if (ui_button(tr("Nodes", NULL), UI_ALIGN_CENTER, "")) {
if (ui_button(tr("Nodes"), UI_ALIGN_CENTER, "")) {
ui_base_show_brush_nodes();
}
ui_end_sticky();