=begin RGSS3 文章スクロール一時停止 mo-to RGSS3 Text scroll Pause ★概要★ 指定したボタンを押している間、文章スクロールが一時停止する機能を追加する。 Features While you hold down the button you specify, to add the ability to scroll text pauses. ★使用法★ スクリプトの▼ 素材 以下 ▼ メイン 以上にこれをコピーして張り付ける。 How to Use Material following the script, paste and copy it to the main or more. ★注意・仕様★ CボタンとAボタンはデフォルトでは早送り機能に使われています。 もし一時停止ボタンと被らせた場合はこの一時停止機能が優先されます。 イベントコマンドで早送り無効にチェックを入れた場合この機能も無効になります。 =end #Customize------------------------------------------------------------------ module MOTO #Specifies the button to scroll between you are pressed to pause. #:DOWN 下 :UP 上 :LEFT 左 :RIGHT 右 :L :R :Y :X (Use in the fast-forward :C and :A) MESS_STOP = :DOWN #The text to the operation display the scroll screen. ADD_MESS = "A button/C button Text fast forward DOWN KEY Stop Scroll" #Character size of the operation display text. The default size 24. ADD_MESS_SIZE = 18 #Text color of the operation display text. "Graphics/System/Window" Reference 0 is White. ADD_MESS_COLOR = 0 end #---------------------------------------------------------------------------- class Window_ScrollText < Window_Base #-------------------------------------------------------------------------- # ○ スクロール速度の取得 #-------------------------------------------------------------------------- alias stop_scroll_speed scroll_speed def scroll_speed return $game_message.scroll_speed * 0 if show_stop? stop_scroll_speed end #-------------------------------------------------------------------------- # ☆ スクロール一時停止判定 #-------------------------------------------------------------------------- def show_stop? !$game_message.scroll_no_fast && Input.press?(MOTO::MESS_STOP) end end class Window_Add_ScrollText < Window_Base #-------------------------------------------------------------------------- # ☆ オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 416 - 48, window_width, fitting_height(1)) self.visible = false self.opacity = 0 end #-------------------------------------------------------------------------- # ☆ ウィンドウ幅の取得 #-------------------------------------------------------------------------- def window_width return Graphics.width end #-------------------------------------------------------------------------- # ☆ フレーム更新 #-------------------------------------------------------------------------- def update super if $game_message.scroll_mode && !$game_message.scroll_no_fast self.visible = true refresh else self.visible = false end end #-------------------------------------------------------------------------- # ☆ リフレッシュ #-------------------------------------------------------------------------- def refresh contents.clear change_color(text_color(MOTO::ADD_MESS_COLOR)) contents.font.size = MOTO::ADD_MESS_SIZE contents.font.bold = true draw_text(0, 0, window_width, 32, MOTO::ADD_MESS, 1) end end class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # ○ スクロール文章ウィンドウの作成 #-------------------------------------------------------------------------- alias ori_moto_create_scroll_text_window create_scroll_text_window def create_scroll_text_window ori_moto_create_scroll_text_window @scroll_text_window_add = Window_Add_ScrollText.new end #-------------------------------------------------------------------------- # ○ 終了処理 #-------------------------------------------------------------------------- alias ori_moto_terminate terminate def terminate ori_moto_terminate @scroll_text_window_add.dispose end end
test.jpg (275.18 KB, 下载次数: 13)
test
#设定部分------------------------------------------------------------------ module MOTO # 指定停止滚动用的按键 # :DOWN 下 :UP 上 :LEFT 左 :RIGHT 右 :L PageUp :R PageDown :Y :X (:C 和 :A 是快速滚动) MESS_STOP = :DOWN # 界面的提示信息 ADD_MESS = "A 键 / C 键:快滚 ↓ 键:停止滚动" # 提示信息的字体大小 ADD_MESS_SIZE = 18 # 窗口皮肤里的颜色,指定提示信息的颜色 ADD_MESS_COLOR = 0 end #----------------------------------------------------------------------------
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |