OSDN Git Service

Merge branch 'macos-develop' into macos-3-0-0
[hengbandforosx/hengbandosx.git] / src / io / input-key-requester.h
index 91d3c56..76b10c1 100644 (file)
@@ -1,7 +1,8 @@
-#pragma once
+#pragma once
 
-#include "system/angband.h"
 #include "game-option/keymap-directory-getter.h"
+#include "system/angband.h"
+#include <optional>
 #include <string>
 
 extern concptr keymap_act[KEYMAP_MODES][256];
@@ -17,9 +18,8 @@ extern TERM_LEN command_gap;
 extern int16_t command_wrk;
 extern int16_t command_new;
 
-class ObjectType;
 class PlayerType;
-struct special_menu_content;
+class SpecialMenuContent;
 class InputKeyRequestor {
 public:
     InputKeyRequestor(PlayerType *player_ptr, bool shopping);
@@ -28,7 +28,6 @@ public:
 private:
     PlayerType *player_ptr;
     bool shopping;
-    char request_command_buffer[256]{}; /*!< Special buffer to hold the action of the current keymap */
     keymap_mode mode;
     int base_y;
     int base_x = 15;
@@ -38,23 +37,25 @@ private:
     int max_num = 0;
     bool is_max_num_odd = false;
     char sub_cmd = 0;
-    
-    void input_command();
+
+    void process_input_command();
     short get_command();
     char inkey_from_menu();
-    bool process_repeat_num(short *cmd);
+    bool process_repeat_num(short &cmd);
     char input_repeat_num();
-    void process_command_command(short *cmd);
-    void process_control_command(short *cmd);
+    void process_command_command(short &cmd);
+    void process_control_command(short &cmd);
     void change_shopping_command();
     int get_caret_command();
     void sweep_confirmation_equipments();
-    void confirm_command(ObjectType &o_ref, const int caret_command);
+    void confirm_command(const std::optional<std::string> &inscription, const int caret_command);
 
     void make_commands_frame();
-    std::string switch_special_menu_condition(special_menu_content &special_menu);
+    std::string switch_special_menu_condition(const SpecialMenuContent &special_menu);
     int get_command_per_menu_num();
     bool check_continuous_command();
     bool check_escape_key(const int old_num);
     bool process_down_cursor();
+    bool process_up_cursor();
+    void process_right_left_cursor();
 };