OSDN Git Service

[Fix] #4053 地形だけ英語表記しかなかったので日本語にも対応させた
authorHourier <66951241+Hourier@users.noreply.github.com>
Thu, 30 May 2024 11:07:41 +0000 (20:07 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Fri, 31 May 2024 12:44:59 +0000 (21:44 +0900)
src/knowledge/knowledge-features.cpp

index 404d37e..f804ac2 100644 (file)
@@ -111,7 +111,7 @@ void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f
     const auto &[wid, hgt] = term_get_size();
     std::vector<FEAT_IDX> feat_idx(TerrainList::get_instance().size());
 
-    const std::string terrain_group("terrains"); //!< @details 他と合わせるためgroupと呼ぶ.
+    const std::string terrain_group(_("地形    ", "Terrains")); //!< @details 他と合わせるためgroupと呼ぶ.
     const auto max_length = terrain_group.length();
     int feat_cnt;
     std::vector<short> grp_idx;
@@ -131,7 +131,7 @@ void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f
         feat_idx[0] = direct_f_idx;
         feat_cnt = 1;
         feat_idx[1] = -1;
-        (void)visual_mode_command('v', &visual_list, browser_rows - 1, wid - max_length + 5, &attr_top, &char_left, &symbol_config.color,
+        (void)visual_mode_command('v', &visual_list, browser_rows - 1, wid - max_length + 3, &attr_top, &char_left, &symbol_config.color,
             &symbol_config.character, need_redraw);
 
         for (FEAT_IDX i = 0; i < F_LIT_MAX; i++) {
@@ -159,7 +159,7 @@ void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f
             if (direct_f_idx < 0) {
                 prt(_("グループ", "Group"), 4, 0);
             }
-            prt(_("名前", "Name"), 4, max_length + 5);
+            prt(_("名前", "Name"), 4, max_length + 3);
             if (use_bigtile) {
                 if (w_ptr->wizard || visual_only) {
                     prt("Idx", 4, 62);
@@ -209,11 +209,11 @@ void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f
         }
 
         if (!visual_list) {
-            display_feature_list(max_length + 5, 6, browser_rows, feat_idx.data(), feat_cur, feat_top, visual_only, F_LIT_STANDARD);
+            display_feature_list(max_length + 3, 6, browser_rows, feat_idx.data(), feat_cur, feat_top, visual_only, F_LIT_STANDARD);
         } else {
             feat_top = feat_cur;
-            display_feature_list(max_length + 5, 6, 1, feat_idx.data(), feat_cur, feat_top, visual_only, *lighting_level);
-            display_visual_list(max_length + 5, 7, browser_rows - 1, wid - max_length + 5, attr_top, char_left);
+            display_feature_list(max_length + 3, 6, 1, feat_idx.data(), feat_cur, feat_top, visual_only, *lighting_level);
+            display_visual_list(max_length + 3, 7, browser_rows - 1, wid - max_length + 3, attr_top, char_left);
         }
 
         prt(format(_("<方向>%s, 'd'で標準光源効果%s, ESC", "<dir>%s, 'd' for default lighting%s, ESC"),
@@ -225,11 +225,11 @@ void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f
         auto &terrain = terrains[feat_idx[feat_cur]];
         symbol_orig = terrain.symbol_configs.at(*lighting_level);
         if (visual_list) {
-            place_visual_list_cursor(max_length + 5, 7, symbol_orig.color, static_cast<uint8_t>(symbol_orig.character), attr_top, char_left);
+            place_visual_list_cursor(max_length + 3, 7, symbol_orig.color, static_cast<uint8_t>(symbol_orig.character), attr_top, char_left);
         } else if (!column) {
             term_gotoxy(0, 6 + (grp_cur - grp_top));
         } else {
-            term_gotoxy(max_length + 5, 6 + (feat_cur - feat_top));
+            term_gotoxy(max_length + 3, 6 + (feat_cur - feat_top));
         }
 
         ch = inkey();
@@ -281,7 +281,7 @@ void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f
             continue;
         }
 
-        if (visual_mode_command(ch, &visual_list, browser_rows - 1, wid - max_length + 5, &attr_top, &char_left, &symbol_orig.color, &symbol_orig.character, need_redraw)) {
+        if (visual_mode_command(ch, &visual_list, browser_rows - 1, wid - max_length + 3, &attr_top, &char_left, &symbol_orig.color, &symbol_orig.character, need_redraw)) {
             switch (ch) {
             case ESCAPE:
                 terrain.symbol_configs = symbols;