paint: add console_model to config

This commit is contained in:
luboslenco
2026-07-30 10:45:09 +02:00
parent 63258b10cf
commit e70d961d23
3 changed files with 19 additions and 8 deletions
+2
View File
@@ -130,6 +130,7 @@ void config_save() {
json_encode_bool("grid_snap", g_config->grid_snap);
json_encode_bool("experimental", g_config->experimental);
json_encode_i32("neural_res", g_config->neural_res);
json_encode_i32("console_model", g_config->console_model);
json_encode_i32("render_mode", g_config->render_mode);
json_encode_i32("workspace", g_config->workspace);
json_encode_i32("workflow", g_config->workflow);
@@ -262,6 +263,7 @@ void config_init() {
g_config->view2d_grid_snap = false;
g_config->experimental = false;
g_config->neural_res = 512;
g_config->console_model = CONSOLE_MODEL_QWEN;
#if defined(IRON_ANDROID) || defined(IRON_IOS)
g_config->render_mode = RENDER_MODE_FORWARD;
#else
+6 -8
View File
@@ -264,6 +264,12 @@ typedef enum {
TEXTURE_RES_CUSTOM = 4,
} texture_res_t;
typedef enum {
CONSOLE_MODEL_QWEN = 0,
CONSOLE_MODEL_CLAUDE = 1,
CONSOLE_MODEL_GROK = 2,
} console_model_t;
typedef enum {
LAYOUT_SIZE_SIDEBAR_W = 0,
LAYOUT_SIZE_SIDEBAR_H0 = 1,
@@ -286,14 +292,6 @@ typedef enum {
PREFERENCES_TAB_PLUGINS = 8,
} preferences_tab_t;
typedef enum {
PHYSICS_SHAPE_BOX = 0,
PHYSICS_SHAPE_SPHERE = 1,
PHYSICS_SHAPE_HULL = 2,
PHYSICS_SHAPE_TERRAIN = 3,
PHYSICS_SHAPE_MESH = 4,
} physics_shape_t;
typedef enum {
ICON18_EYE_ON = 0,
ICON18_EYE_OFF = 1,
+11
View File
@@ -879,6 +879,17 @@ void box_preferences_neural_tab() {
i32 neural_res_sel = ui_combo(h_neural_res, neural_res_combo, tr("Resolution"), true, UI_ALIGN_LEFT, true);
g_config->neural_res = neural_res_sel == 2 ? 2048 : (neural_res_sel == 1 ? 1024 : 512);
ui_handle_t *h_console_model = ui_handle(__ID__);
h_console_model->i = g_config->console_model;
string_array_t *console_model_combo = any_array_create_from_raw(
(void *[]){
"Qwen",
"Claude",
"Grok",
},
3);
g_config->console_model = ui_combo(h_console_model, console_model_combo, tr("Console Model"), true, UI_ALIGN_LEFT, true);
ui_text(tr("Models"), UI_ALIGN_LEFT, 0x00000000);
if (neural_node_models == NULL) {