#============================================================================== # □ フォントセッティング (for VX Ace) #------------------------------------------------------------------------------ # Version : 2_20120701 # by サリサ・タイクーン # http://www.tycoon812.com/rgss/ #============================================================================== #============================================================================== # □ 素材スイッチ #============================================================================== $rgsslab = {} if $rgsslab == nil $rgsslab["フォントセッティング"] = true if $rgsslab["フォントセッティング"] #============================================================================== # □ カスタマイズポイント #============================================================================== module RGSSLAB end module RGSSLAB::Font_Setting #-------------------------------------------------------------------------- # ○ ウィンドウのフォント # 標準は"VL Gothic"です。 # 全ウィンドウ共通です。 # # ・変更方法 # $game_system.rgsslab144.window = "フォント名" #-------------------------------------------------------------------------- WINDOW = "VL Gothic" #"MS P明朝"#"VL Gothic" #-------------------------------------------------------------------------- # ○ タイマーのフォント # 標準は"VL Gothic"です。 # # ・変更方法 # $game_system.rgsslab144.sprite_timer = "フォント名" #-------------------------------------------------------------------------- SPRITE_TIMER = "VL Gothic" #-------------------------------------------------------------------------- # ○ タイトル名のフォント # 標準は"VL Gothic"です。 # # タイトル名描画が有効でない場合は # 当然ながら意味がありません。 # # この設定は、上記の2つとは異なり # イベントコマンドのスクリプトで変更する事はできません。 #-------------------------------------------------------------------------- TITLE = "VL Gothic" #-------------------------------------------------------------------------- # ○ フォントの大きさ # 標準は24です。 # # ・変更方法 # $game_system.rgsslab144.size = フォントサイズ # # タイトル名のフォント・タイマーのフォントの大きさには # 影響しません。 #-------------------------------------------------------------------------- SIZE = 24 end # カスタマイズポイントは、ここまで #============================================================================== # □ RGSSLAB::Font_Setting [module] #============================================================================== module RGSSLAB::Font_Setting #-------------------------------------------------------------------------- # ○ 素材設定用の定数定義 #-------------------------------------------------------------------------- MATERIAL_NAME = "フォントセッティング" VERSION = 2 RELEASE = 20120701 end #============================================================================== # □ Combined_Use_Modules [module] #============================================================================== module Combined_Use_Modules #============================================================================ # □ KAMESOFT(TOMYさん) #============================================================================ module KAMESOFT #------------------------------------------------------------------------ # ○ 汎用ゲージ描画 #------------------------------------------------------------------------ def self.generic_gauge return true if $kms_imported["GenericGauge"] if $kms_imported != nil return false end #------------------------------------------------------------------------ # ○ カーソルアニメーション #------------------------------------------------------------------------ def self.cursor_animation return true if $kms_imported["CursorAnimation"] if $kms_imported != nil return false end end end #============================================================================== # ■ Game_System [class] #============================================================================== class Game_System #-------------------------------------------------------------------------- # ● 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :rgsslab144 #-------------------------------------------------------------------------- # ● オブジェクト初期化 [エイリアス] #-------------------------------------------------------------------------- alias font_setting_initialize initialize def initialize font_setting_initialize @rgsslab144 = RgssLab_144.new end end #============================================================================== # □ RgssLab_144 [class] #============================================================================== class RgssLab_144 #-------------------------------------------------------------------------- # ○ モジュールの設定 #-------------------------------------------------------------------------- RGSSLAB_144 = RGSSLAB::Font_Setting #-------------------------------------------------------------------------- # ○ 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :window attr_accessor :sprite_timer attr_accessor :size #-------------------------------------------------------------------------- # ○ オブジェクト初期化 #-------------------------------------------------------------------------- def initialize @window = RGSSLAB_144::WINDOW @sprite_timer = RGSSLAB_144::SPRITE_TIMER @size = RGSSLAB_144::SIZE end end #============================================================================== # ■ Window_Base [class] #============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # ● オブジェクト初期化 [再構築] # x : 横の位置 # y : 縦の位置 # width : 幅 # height : 高さ #-------------------------------------------------------------------------- def initialize(x, y, width, height) super self.windowskin = Cache.system("Window") update_padding update_tone create_contents contents.font.name = $game_system.rgsslab144.window contents.font.size = $game_system.rgsslab144.size @opening = @closing = false if Combined_Use_Modules::KAMESOFT.generic_gauge @@__gauge_buf = Bitmap.new(320, 24) if @@__gauge_buf.disposed? end if Combined_Use_Modules::KAMESOFT.cursor_animation @@__cursor_animation.add_window(self) end end #-------------------------------------------------------------------------- # ● フォント設定のリセット [再構築] #-------------------------------------------------------------------------- def reset_font_settings change_color(normal_color) contents.font.size = Font.default_size contents.font.bold = Font.default_bold contents.font.italic = Font.default_italic contents.font.size = $game_system.rgsslab144.size end end #============================================================================== # ■ Window_Command [class] #============================================================================== class Window_Command < Window_Selectable #-------------------------------------------------------------------------- # ● リフレッシュ [再構築][オーバーライド] #-------------------------------------------------------------------------- def refresh clear_command_list make_command_list create_contents contents.font.name = $game_system.rgsslab144.window contents.font.size = $game_system.rgsslab144.size super end end #============================================================================== # ■ Window_ItemList [class] #============================================================================== class Window_ItemList < Window_Selectable #-------------------------------------------------------------------------- # ● リフレッシュ [再構築] #-------------------------------------------------------------------------- def refresh make_item_list create_contents contents.font.name = $game_system.rgsslab144.window contents.font.size = $game_system.rgsslab144.size draw_all_items end end #============================================================================== # ■ Window_SkillList [class] #============================================================================== class Window_SkillList < Window_Selectable #-------------------------------------------------------------------------- # ● リフレッシュ [再構築] #-------------------------------------------------------------------------- def refresh make_item_list create_contents contents.font.name = $game_system.rgsslab144.window contents.font.size = $game_system.rgsslab144.size draw_all_items end end #============================================================================== # ■ Window_EquipSlot [class] #============================================================================== class Window_EquipSlot < Window_Selectable #-------------------------------------------------------------------------- # ○ リフレッシュ [オーバーライド] #-------------------------------------------------------------------------- def refresh contents.clear contents.font.name = $game_system.rgsslab144.window contents.font.size = $game_system.rgsslab144.size draw_all_items end end #============================================================================== # ■ Window_ShopBuy [class] #============================================================================== class Window_ShopBuy < Window_Selectable #-------------------------------------------------------------------------- # ● リフレッシュ [再構築] #-------------------------------------------------------------------------- def refresh make_item_list create_contents contents.font.name = $game_system.rgsslab144.window contents.font.size = $game_system.rgsslab144.size draw_all_items end end #============================================================================== # ■ Window_NumberInput [class] #============================================================================== class Window_NumberInput < Window_Base #-------------------------------------------------------------------------- # ● 入力処理の開始 [再構築] #-------------------------------------------------------------------------- def start @digits_max = $game_message.num_input_digits_max @number = $game_variables[$game_message.num_input_variable_id] @number = [[@number, 0].max, 10 ** @digits_max - 1].min @index = 0 update_placement create_contents contents.font.name = $game_system.rgsslab144.window contents.font.size = $game_system.rgsslab144.size refresh open activate end end #============================================================================== # ■ Window_ScrollText [class] #============================================================================== class Window_ScrollText < Window_Base #-------------------------------------------------------------------------- # ● リフレッシュ [再構築] #-------------------------------------------------------------------------- def refresh reset_font_settings update_all_text_height create_contents contents.font.name = $game_system.rgsslab144.window contents.font.size = $game_system.rgsslab144.size draw_text_ex(4, 0, @text) self.oy = @scroll_pos = -height end end #============================================================================== # ■ Window_DebugLeft [class] #============================================================================== class Window_DebugLeft < Window_Selectable #-------------------------------------------------------------------------- # ● リフレッシュ [再構築] #-------------------------------------------------------------------------- def refresh @switch_max = ($data_system.switches.size - 1 + 9) / 10 @variable_max = ($data_system.variables.size - 1 + 9) / 10 @item_max = @switch_max + @variable_max create_contents contents.font.name = $game_system.rgsslab144.window contents.font.size = $game_system.rgsslab144.size draw_all_items end end #============================================================================== # ■ Sprite_Timer [class] #============================================================================== class Sprite_Timer < Sprite #-------------------------------------------------------------------------- # ● オブジェクト初期化 [再構築] # viewport : ビューポート #-------------------------------------------------------------------------- def initialize(viewport) super(viewport) create_bitmap self.bitmap.font.name = $game_system.rgsslab144.sprite_timer update end end #============================================================================== # ■ Scene_Title [class] #============================================================================== class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # ○ モジュールの設定 #-------------------------------------------------------------------------- RGSSLAB_144 = RGSSLAB::Font_Setting #-------------------------------------------------------------------------- # ● ゲームタイトルの描画 [再構築] #-------------------------------------------------------------------------- def draw_game_title @foreground_sprite.bitmap.font.size = 48 @foreground_sprite.bitmap.font.name = RGSSLAB_144::TITLE rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2) @foreground_sprite.bitmap.draw_text(rect, $data_system.game_title, 1) end end end