diff --git a/includes/config.h b/includes/config.h index e5abc6a..b92c2db 100644 --- a/includes/config.h +++ b/includes/config.h @@ -6,7 +6,7 @@ /* By: stakada +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/08/22 21:44:50 by stakada #+# #+# */ -/* Updated: 2026/02/20 20:25:07 by stakada ### ########.fr */ +/* Updated: 2026/02/23 10:48:44 by stakada ### ########.fr */ /* */ /* ************************************************************************** */ @@ -40,6 +40,8 @@ # define KEY_RIGHT 124 # define KEY_PLUS 24 # define KEY_MINUS 27 +# define KEY_P 35 +# define KEY_M 46 # define KEY_H 4 # define KEY_J 38 # else @@ -61,6 +63,8 @@ # define KEY_RIGHT XK_Right # define KEY_PLUS XK_plus # define KEY_MINUS XK_minus +# define KEY_P XK_p +# define KEY_M XK_m # define KEY_H XK_h # define KEY_J XK_j # endif diff --git a/srcs/key_handler.c b/srcs/key_handler.c index 5f7d1e1..5736879 100644 --- a/srcs/key_handler.c +++ b/srcs/key_handler.c @@ -6,7 +6,7 @@ /* By: stakada +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/01/10 20:00:00 by kinamura #+# #+# */ -/* Updated: 2026/02/15 03:13:07 by stakada ### ########.fr */ +/* Updated: 2026/02/23 10:43:59 by stakada ### ########.fr */ /* */ /* ************************************************************************** */ @@ -77,12 +77,12 @@ static int get_rotate_params(int keycode, t_vec3 *axis, double *angle) static int get_adjust_params(int keycode, int *sign, int *height_mode) { - if (keycode == KEY_PLUS) + if (keycode == KEY_P) { *sign = 1; *height_mode = 0; } - else if (keycode == KEY_MINUS) + else if (keycode == KEY_M) { *sign = -1; *height_mode = 0; diff --git a/srcs/put_info.c b/srcs/put_info.c index 2ec483b..16a8fb6 100644 --- a/srcs/put_info.c +++ b/srcs/put_info.c @@ -6,7 +6,7 @@ /* By: stakada +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/02/15 00:30:30 by stakada #+# #+# */ -/* Updated: 2026/02/15 02:18:32 by stakada ### ########.fr */ +/* Updated: 2026/02/23 10:44:25 by stakada ### ########.fr */ /* */ /* ************************************************************************** */ @@ -34,7 +34,7 @@ static void put_camera_info(t_ctx *ctx) mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * 6, TEXT_COLOR, " Rotate: Arrow keys"); mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * 7, TEXT_COLOR, - " FOV: + (Increase), - (Decrease)"); + " FOV: P (Increase), M (Decrease)"); } static void put_light_info(t_ctx *ctx) @@ -46,7 +46,7 @@ static void put_light_info(t_ctx *ctx) mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * 5, TEXT_COLOR, " Move: W, A, S, D, Q, E"); mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * 6, TEXT_COLOR, - " Brightness: + (Increase), - (Decrease)"); + " Brightness: P (Increase), M (Decrease)"); } static void put_object_info(t_ctx *ctx) @@ -72,7 +72,7 @@ static void put_object_info(t_ctx *ctx) if (ctx->selected_object->type == SPHERE || ctx->selected_object->type == CYLINDER) mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * line++, - TEXT_COLOR, " Diameter: + (Increase), - (Decrease)"); + TEXT_COLOR, " Diameter: P (Increase), M (Decrease)"); if (ctx->selected_object->type == CYLINDER) mlx_string_put(ctx->mlx, ctx->win, MARGIN, LINE_HEIGHT * line++, TEXT_COLOR, " Height: H (Increase), J (Decrease)");