diff --git a/paint/sources/camera.c b/paint/sources/camera.c index c1e8ebd6..c8e1eb86 100644 --- a/paint/sources/camera.c +++ b/paint/sources/camera.c @@ -71,8 +71,8 @@ static void camera_orbit_action(bool modif, bool default_keymap) { camera->base->transform->loc.y = pivot_y + offset.y; camera->base->transform->loc.z = pivot_z + offset.z; camera_object_build_mat(camera); - return; } + return; } f32 dist = camera_distance(); @@ -133,8 +133,8 @@ static void camera_rotate_action(bool modif, bool default_keymap) { t->loc.y = pivot_y + offset.y; t->loc.z = pivot_z + offset.z; transform_build_matrix(t); - return; } + return; } transform_rotate(t, up, (mouse_movement_x / 120.0) * config_raw->camera_rotation_speed); diff --git a/paint/sources/config.c b/paint/sources/config.c index 7961bba3..89bc6d35 100644 --- a/paint/sources/config.c +++ b/paint/sources/config.c @@ -208,7 +208,7 @@ void config_init() { config_raw->zoom_direction = ZOOM_DIRECTION_VERTICAL; config_raw->displace_strength = 0.0; config_raw->wrap_mouse = false; - config_raw->camera_pivot = CAMERA_PIVOT_CURSOR; + config_raw->camera_pivot = CAMERA_PIVOT_CENTER; config_raw->camera_controls = CAMERA_CONTROLS_ORBIT; config_raw->layer_res = TEXTURE_RES_RES2048; #if defined(IRON_ANDROID) || defined(IRON_IOS) diff --git a/paint/sources/enums.h b/paint/sources/enums.h index 0ea82f17..e1b4f3a7 100644 --- a/paint/sources/enums.h +++ b/paint/sources/enums.h @@ -168,8 +168,8 @@ typedef enum { } camera_controls_t; typedef enum { - CAMERA_PIVOT_CURSOR = 0, - CAMERA_PIVOT_CAMERA_CENTER = 1, + CAMERA_PIVOT_CURSOR = 0, + CAMERA_PIVOT_CENTER = 1, } camera_pivot_t; typedef enum { diff --git a/paint/sources/ui_menubar.c b/paint/sources/ui_menubar.c index 1771e2a2..401147af 100644 --- a/paint/sources/ui_menubar.c +++ b/paint/sources/ui_menubar.c @@ -370,7 +370,7 @@ void ui_menubar_draw_category_items() { project_save_as(false); } - ui->changed = false; + ui->changed = false; ui_handle_t *h_pack_assets = ui_handle(__ID__); h_pack_assets->b = context_raw->pack_assets_on_save; context_raw->pack_assets_on_save = ui_check(h_pack_assets, tr("Pack Assets"), ""); @@ -758,13 +758,15 @@ void ui_menubar_draw_category_items() { ui_menu_align(); ui_menu_label(tr("Pivot"), any_map_get(config_keymap, "view_pivot_center")); ui_menu_align(); - ui_handle_t *h = ui_handle(__ID__); + ui_handle_t *camera_pivot_handle = ui_handle(__ID__); + camera_pivot_handle->i = context_raw->camera_pivot; string_t_array_t *pivot_center_items = any_array_create_from_raw( (void *[]){ - tr("Cursor"), tr("Center"), + tr("Cursor"), + tr("Center"), }, 2); - context_raw->camera_pivot = ui_inline_radio(h, pivot_center_items, UI_ALIGN_LEFT); + context_raw->camera_pivot = ui_inline_radio(camera_pivot_handle, pivot_center_items, UI_ALIGN_LEFT); ui_menu_separator(); ui_menu_align();