From 17a65a09b2b4d70ce323c836435f3a57f738b316 Mon Sep 17 00:00:00 2001 From: stakada Date: Mon, 23 Feb 2026 10:46:42 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[fix]=20=20=E6=A0=A1=E8=88=8E=E7=92=B0?= =?UTF-8?q?=E5=A2=83=E3=81=AB=E5=90=88=E3=82=8F=E3=81=9B=E3=81=A6+-?= =?UTF-8?q?=E3=82=AD=E3=83=BC=E3=82=92P,=20M=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/config.h | 6 +++++- srcs/key_handler.c | 6 +++--- srcs/put_info.c | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/includes/config.h b/includes/config.h index e5abc6a..17ab575 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:43:39 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)"); From 27af3569d0e6e7c5288d5f0f74a57e4fb633c59f Mon Sep 17 00:00:00 2001 From: stakada Date: Mon, 23 Feb 2026 10:49:00 +0900 Subject: [PATCH 2/2] [fix] Norm --- includes/config.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/config.h b/includes/config.h index 17ab575..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/23 10:43:39 by stakada ### ########.fr */ +/* Updated: 2026/02/23 10:48:44 by stakada ### ########.fr */ /* */ /* ************************************************************************** */ @@ -40,8 +40,8 @@ # define KEY_RIGHT 124 # define KEY_PLUS 24 # define KEY_MINUS 27 -# define KEY_P 35 -# define KEY_M 46 +# define KEY_P 35 +# define KEY_M 46 # define KEY_H 4 # define KEY_J 38 # else @@ -63,8 +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_P XK_p +# define KEY_M XK_m # define KEY_H XK_h # define KEY_J XK_j # endif