OSDN Git Service

Merge branch 'macos-develop' into macos-3-0-0
[hengbandforosx/hengbandosx.git] / src / io / input-key-requester.h
index 5f89864..76b10c1 100644 (file)
@@ -1,7 +1,9 @@
-#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,18 +19,43 @@ extern int16_t command_wrk;
 extern int16_t command_new;
 
 class PlayerType;
+class SpecialMenuContent;
 class InputKeyRequestor {
 public:
-    InputKeyRequestor(PlayerType *player_ptr, int shopping);
+    InputKeyRequestor(PlayerType *player_ptr, bool shopping);
     void request_command();
 
 private:
     PlayerType *player_ptr;
-    int shopping;
-    char request_command_buffer[256]{}; /*!< Special buffer to hold the action of the current keymap */
+    bool shopping;
+    keymap_mode mode;
+    int base_y;
+    int base_x = 15;
+    int menu_num = 0;
+    int num = 0;
+    char command = 0;
+    int max_num = 0;
+    bool is_max_num_odd = false;
+    char sub_cmd = 0;
 
-    short get_command(const keymap_mode mode);
+    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 change_shopping_command();
+    int get_caret_command();
+    void sweep_confirmation_equipments();
+    void confirm_command(const std::optional<std::string> &inscription, const int caret_command);
+
+    void make_commands_frame();
+    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();
 };