Shrink defeat font size

This commit is contained in:
dazedanon 2025-04-28 11:31:48 -05:00
parent 4f2a994fdc
commit 74c2340284
2 changed files with 30 additions and 3 deletions

Binary file not shown.

View file

@ -11,8 +11,21 @@ module PON_FONT
# ● スイッチがオフの時のフォント名(デフォルトのフォント名)
#--------------------------------------------------------------------------
OFF_FONT = "いろはマルみかみ Mediam"
#--------------------------------------------------------------------------
# ● デフォルトフォントサイズ設定
#--------------------------------------------------------------------------
DEFAULT_SIZE = {
"みかちゃん" => 20,
"いろはマルみかみ Mediam" => Font.default_size
}
#--------------------------------------------------------------------------
# ● フォントサイズの取得
#--------------------------------------------------------------------------
def self.get_font_size(font_name)
DEFAULT_SIZE[font_name] || Font.default_size
end
#----------------------------------------------------------------------------
# ★ 設定ここまで
@ -79,6 +92,7 @@ class Window_Base < Window
def initialize(x, y, width, height)
sw_font_change_initialize(x, y, width, height)
@font_switch = $game_switches[PON_FONT::FONT_S]
update_font_settings
end
#--------------------------------------------------------------------------
# ● フレーム更新
@ -94,11 +108,24 @@ class Window_Base < Window
def update_font
@font_change_flag = false
if @font_switch != $game_switches[PON_FONT::FONT_S]
contents.font.name = Font.default_name
update_font_settings
@font_switch = $game_switches[PON_FONT::FONT_S]
@font_change_flag = true
end
end
#--------------------------------------------------------------------------
# ● フォント設定の更新
#--------------------------------------------------------------------------
def update_font_settings
current_font = Font.default_name
contents.font.name = current_font
if current_font == "みかちゃん"
contents.font.size = 20 # Changed from 20 to 18
Font.default_size = 20 # Changed from 20 to 18
else
contents.font.size = Font.default_size
end
end
end
#==============================================================================
# ■ Window_Selectable