OSDN Git Service

[Feature] 現在の知識の確認画面をウィンドウ中央に表示する
authorHabu <habu1010+github@gmail.com>
Sun, 7 May 2023 00:32:50 +0000 (09:32 +0900)
committerHabu <habu1010+github@gmail.com>
Sun, 7 May 2023 00:32:50 +0000 (09:32 +0900)
現在の知識の確認の項目選択画面は 80x24 で表示することを想定しているので、
ウィンドウ中央に表示する。

src/cmd-io/cmd-knowledge.cpp

index c983ca5..3127a93 100644 (file)
@@ -15,6 +15,7 @@
 #include "knowledge/knowledge-uniques.h"
 #include "main/sound-of-music.h"
 #include "system/player-type-definition.h"
+#include "term/gameterm.h"
 #include "term/screen-processor.h"
 #include "util/int-char-converter.h"
 #include "view/display-messages.h"
@@ -27,6 +28,7 @@ void do_cmd_knowledge(PlayerType *player_ptr)
     int i, p = 0;
     bool need_redraw = false;
     screen_save();
+    TermCenteredOffsetSetter tcos(MAIN_TERM_MIN_COLS, MAIN_TERM_MIN_ROWS);
     while (true) {
         term_clear();
         prt(format(_("%d/2 ページ", "page %d/2"), (p + 1)), 2, 65);