return ss.str();
};
char new_name[160] = "";
- if (!get_string(ask_msg, new_name, sizeof new_name) || !new_name[0]) {
+ if (!input_string(ask_msg, new_name, sizeof new_name) || !new_name[0]) {
if (one_in_(2)) {
return wrap_name(get_table_sindarin_aux());
} else {
concptr p = _("休憩 (0-9999, '*' で HP/MP全快, '&' で必要なだけ): ", "Rest (0-9999, '*' for HP/SP, '&' as needed): ");
char out_val[80];
strcpy(out_val, "&");
- if (!get_string(p, out_val, 4)) {
+ if (!input_string(p, out_val, 4)) {
return;
}
char buf[1024] = "";
play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_WINNER);
do {
- while (!get_string(_("*勝利*メッセージ: ", "*Winning* message: "), buf, sizeof(buf))) {
+ while (!input_string(_("*勝利*メッセージ: ", "*Winning* message: "), buf, sizeof(buf))) {
;
}
} while (!get_check_strict(player_ptr, _("よろしいですか?", "Are you sure? "), CHECK_NO_HISTORY));
}
/* Get a new inscription (possibly empty) */
- if (get_string(_("名前: ", "Name: "), out_val, 15)) {
+ if (input_string(_("名前: ", "Name: "), out_val, 15)) {
if (out_val[0]) {
/* Save the inscription */
m_ptr->nickname = out_val;
static void add_diary_note(PlayerType *player_ptr)
{
char tmp[80]{};
- if (get_string(_("内容: ", "diary note: "), tmp, 79)) {
+ if (input_string(_("内容: ", "diary note: "), tmp, 79)) {
exe_write_diary(player_ptr, DiaryKind::DESCRIPTION, 0, tmp);
}
}
{
char buf[80];
strcpy(buf, "");
- if (!get_string(_("設定変更コマンド: ", "Pref: "), buf, 80)) {
+ if (!input_string(_("設定変更コマンド: ", "Pref: "), buf, 80)) {
return;
}
{
char buf[80];
strcpy(buf, "");
- if (!get_string(_("メモ: ", "Note: "), buf, 60)) {
+ if (!input_string(_("メモ: ", "Note: "), buf, 60)) {
return;
}
if (!buf[0] || (buf[0] == ' ')) {
buf = _("乗馬可能モンスターのリスト", "Ridable monster list.");
} else if (sym == KTRL('M')) {
all = true;
- if (!get_string(_("名前(英語の場合小文字で可)", "Enter name:"), temp, 70)) {
+ if (!input_string(_("名前(英語の場合小文字で可)", "Enter name:"), temp, 70)) {
temp[0] = 0;
return;
}
static void exe_cmd_save_screen_html_with_naming()
{
char tmp[256] = "screen.html";
- if (!get_string(_("ファイル名: ", "File name: "), tmp, 80)) {
+ if (!input_string(_("ファイル名: ", "File name: "), tmp, 80)) {
return;
}
angband_strcpy(out_val, o_ptr->inscription.value(), MAX_INSCRIPTION);
}
- if (get_string(_("銘: ", "Inscription: "), out_val, MAX_INSCRIPTION)) {
+ if (input_string(_("銘: ", "Inscription: "), out_val, MAX_INSCRIPTION)) {
o_ptr->inscription.emplace(out_val);
auto &rfu = RedrawingFlagsUpdater::get_instance();
static constexpr auto flags_srf = {
process_player_name(player_ptr);
} else if (c == 'f') {
strnfmt(tmp, sizeof(tmp), "%s.txt", player_ptr->base_name);
- if (get_string(_("ファイル名: ", "File name: "), tmp, 80)) {
+ if (input_string(_("ファイル名: ", "File name: "), tmp, 80)) {
if (tmp[0] && (tmp[0] != ' ')) {
update_playtime();
file_character(player_ptr, tmp);
*
* We clear the input, and return FALSE, on "ESCAPE".
*/
-bool get_string(std::string_view prompt, char *buf, int len)
+bool input_string(std::string_view prompt, char *buf, int len)
{
bool res;
msg_print(nullptr);
ss << prompt << "(" << min << "-" << max << "): ";
auto digit = std::max(std::to_string(min).length(), std::to_string(max).length());
while (true) {
- if (!get_string(ss.str().data(), tmp_val, digit)) {
+ if (!input_string(ss.str().data(), tmp_val, digit)) {
return std::nullopt;
}
class PlayerType;
bool askfor(char *buf, int len, bool numpad_cursor = true);
-bool get_string(std::string_view prompt, char *buf, int len);
+bool input_string(std::string_view prompt, char *buf, int len);
bool get_check(std::string_view prompt);
bool get_check_strict(PlayerType *player_ptr, std::string_view prompt, BIT_FLAGS mode);
bool get_com(std::string_view prompt, char *command, bool z_escape);
FILE *ffp;
char xtmp[81] = "";
- if (!get_string(_("ファイル名: ", "File name: "), xtmp, 80)) {
+ if (!input_string(_("ファイル名: ", "File name: "), xtmp, 80)) {
continue;
}
std::stringstream ss;
ss << player_ptr->base_name << ".amv";
auto movie_filename = ss.str();
- if (!get_string(_("ムービー記録ファイル: ", "Movie file name: "), movie_filename.data(), 80)) {
+ if (!input_string(_("ムービー記録ファイル: ", "Movie file name: "), movie_filename.data(), 80)) {
return;
}
buf = _("ユニーク外モンスターのリスト", "Non-unique monster list.");
} else if (sym == KTRL('M')) {
all = true;
- if (!get_string(_("名前(英語の場合小文字で可)", "Enter name:"), temp, 70)) {
+ if (!input_string(_("名前(英語の場合小文字で可)", "Enter name:"), temp, 70)) {
temp[0] = 0;
screen_load();
angband_strcpy(player_last_words, death_message, max_last_words);
do {
#ifdef JP
- while (!get_string(winning_seppuku ? "辞世の句: " : "断末魔の叫び: ", player_last_words, max_last_words)) {
+ while (!input_string(winning_seppuku ? "辞世の句: " : "断末魔の叫び: ", player_last_words, max_last_words)) {
;
}
#else
- while (!get_string("Last words: ", player_last_words, max_last_words)) {
+ while (!input_string("Last words: ", player_last_words, max_last_words)) {
;
}
#endif
char tmp[64];
strcpy(tmp, player_ptr->name);
- if (get_string(_("キャラクターの名前を入力して下さい: ", "Enter a name for your character: "), tmp, 15)) {
+ if (input_string(_("キャラクターの名前を入力して下さい: ", "Enter a name for your character: "), tmp, 15)) {
strcpy(player_ptr->name, tmp);
}
bool fixed = true;
while (1) {
- if (get_string(_("何をお望み? ", "For what do you wish?"), buf, (MAX_NLEN - 1))) {
+ if (input_string(_("何をお望み? ", "For what do you wish?"), buf, (MAX_NLEN - 1))) {
break;
}
if (confirm) {
void wiz_debug_spell(PlayerType *player_ptr)
{
char tmp_val[50] = "\0";
- if (!get_string("SPELL: ", tmp_val, 32)) {
+ if (!input_string("SPELL: ", tmp_val, 32)) {
return;
}