OSDN Git Service

[Refactor] #3406 get_value() をinput_value_int() に変えた
[hengbandforosx/hengbandosx.git] / src / core / asking-player.h
1 #pragma once
2
3 #include "system/angband.h"
4 #include <optional>
5 #include <string_view>
6
7 /*
8  * Bit flags for control of get_check_strict()
9  */
10 #define CHECK_OKAY_CANCEL 0x01
11 #define CHECK_NO_ESCAPE 0x02
12 #define CHECK_NO_HISTORY 0x04
13 #define CHECK_DEFAULT_Y 0x08
14
15 class PlayerType;
16 bool askfor(char *buf, int len, bool numpad_cursor = true);
17 bool get_string(std::string_view prompt, char *buf, int len);
18 bool get_check(std::string_view prompt);
19 bool get_check_strict(PlayerType *player_ptr, std::string_view prompt, BIT_FLAGS mode);
20 bool get_com(std::string_view prompt, char *command, bool z_escape);
21 QUANTITY get_quantity(std::optional<std::string_view> prompt_opt, QUANTITY max);
22 void pause_line(int row);
23 std::optional<int> input_value_int(std::string_view prompt, int min, int max, int initial_value = 0);