질문과 답변

Extra Form

다시 말해서 ESC버튼을 눌렀을 때 취소가 불가능하게 하는 방법이 뭔가요?

Comment '8'
  • profile
    북극토끼 2014.07.22 18:51
    #==============================================================================
    # ■ Scene_Save
    #------------------------------------------------------------------------------
    #  セーブ画面の処理を行うクラスです。
    #==============================================================================

    class Scene_Save < Scene_File
    #--------------------------------------------------------------------------
    # ● ヘルプウィンドウのテキストを取得
    #--------------------------------------------------------------------------
    def help_window_text
    Vocab::SaveMessage
    end
    #--------------------------------------------------------------------------
    # ● 最初に選択状態にするファイルインデックスを取得
    #--------------------------------------------------------------------------
    def first_savefile_index
    DataManager.last_savefile_index
    end
    #--------------------------------------------------------------------------
    # ● セーブファイルの決定
    #--------------------------------------------------------------------------
    def on_savefile_ok
    super
    if DataManager.save_game(@index)
    on_save_success
    else
    Sound.play_buzzer
    end
    end
    #--------------------------------------------------------------------------
    # ● セーブ成功時の処理
    #--------------------------------------------------------------------------
    def on_save_success
    Sound.play_save
    return_scene
    end
    end
  • profile
    북극토끼 2014.07.22 18:52
    Scene_Save항목을 이 스크립트로 교체해 보세요. 일단 제 프로젝트에서는 정상적으로 작동하네요.
  • ?
    작삼 2014.07.22 19:08
    죄송하지만 저는 정삭적으로 작동하지 않네요 ㅠ
  • ?
    작삼 2014.07.22 19:13
    그보다도 스크립트가 똑같아 보이는데 뭐가 틀려졌다는건지...
  • profile
    북극토끼 2014.07.22 19:16
    아 죄송합니다 스크립트가 틀렸네요
  • profile
    북극토끼 2014.07.22 19:16
    #==============================================================================
    # ■ Scene_File
    #------------------------------------------------------------------------------
    #  セーブ画面とロード画面の共通処理を行うクラスです。
    #==============================================================================

    class Scene_File < Scene_MenuBase
    #--------------------------------------------------------------------------
    # ● 開始処理
    #--------------------------------------------------------------------------
    def start
    super
    create_help_window
    create_savefile_viewport
    create_savefile_windows
    init_selection
    end
    #--------------------------------------------------------------------------
    # ● 終了処理
    #--------------------------------------------------------------------------
    def terminate
    super
    @savefile_viewport.dispose
    @savefile_windows.each {|window| window.dispose }
    end
    #--------------------------------------------------------------------------
    # ● フレーム更新
    #--------------------------------------------------------------------------
    def update
    super
    @savefile_windows.each {|window| window.update }
    update_savefile_selection
    end
    #--------------------------------------------------------------------------
    # ● ヘルプウィンドウの作成
    #--------------------------------------------------------------------------
    def create_help_window
    @help_window = Window_Help.new(1)
    @help_window.set_text(help_window_text)
    end
    #--------------------------------------------------------------------------
    # ● ヘルプウィンドウのテキストを取得
    #--------------------------------------------------------------------------
    def help_window_text
    return ""
    end
    #--------------------------------------------------------------------------
    # ● セーブファイルビューポートの作成
    #--------------------------------------------------------------------------
    def create_savefile_viewport
    @savefile_viewport = Viewport.new
    @savefile_viewport.rect.y = @help_window.height
    @savefile_viewport.rect.height -= @help_window.height
    end
    #--------------------------------------------------------------------------
    # ● セーブファイルウィンドウの作成
    #--------------------------------------------------------------------------
    def create_savefile_windows
    @savefile_windows = Array.new(item_max) do |i|
    Window_SaveFile.new(savefile_height, i)
    end
    @savefile_windows.each {|window| window.viewport = @savefile_viewport }
    end
    #--------------------------------------------------------------------------
    # ● 選択状態の初期化
    #--------------------------------------------------------------------------
    def init_selection
    @index = first_savefile_index
    @savefile_windows[@index].selected = true
    self.top_index = @index - visible_max / 2
    ensure_cursor_visible
    end
    #--------------------------------------------------------------------------
    # ● 項目数の取得
    #--------------------------------------------------------------------------
    def item_max
    DataManager.savefile_max
    end
    #--------------------------------------------------------------------------
    # ● 画面内に表示するセーブファイル数を取得
    #--------------------------------------------------------------------------
    def visible_max
    return 4
    end
    #--------------------------------------------------------------------------
    # ● セーブファイルウィンドウの高さを取得
    #--------------------------------------------------------------------------
    def savefile_height
    @savefile_viewport.rect.height / visible_max
    end
    #--------------------------------------------------------------------------
    # ● 最初に選択状態にするファイルインデックスを取得
    #--------------------------------------------------------------------------
    def first_savefile_index
    return 0
    end
    #--------------------------------------------------------------------------
    # ● 現在のインデックスの取得
    #--------------------------------------------------------------------------
    def index
    @index
    end
    #--------------------------------------------------------------------------
    # ● 先頭のインデックスの取得
    #--------------------------------------------------------------------------
    def top_index
    @savefile_viewport.oy / savefile_height
    end
    #--------------------------------------------------------------------------
    # ● 先頭のインデックスの設定
    #--------------------------------------------------------------------------
    def top_index=(index)
    index = 0 if index < 0
    index = item_max - visible_max if index > item_max - visible_max
    @savefile_viewport.oy = index * savefile_height
    end
    #--------------------------------------------------------------------------
    # ● 末尾のインデックスの取得
    #--------------------------------------------------------------------------
    def bottom_index
    top_index + visible_max - 1
    end
    #--------------------------------------------------------------------------
    # ● 末尾のインデックスの設定
    #--------------------------------------------------------------------------
    def bottom_index=(index)
    self.top_index = index - (visible_max - 1)
    end
    #--------------------------------------------------------------------------
    # ● セーブファイル選択の更新
    #--------------------------------------------------------------------------
    def update_savefile_selection
    return on_savefile_ok if Input.trigger?(:C)
    #return on_savefile_cancel if Input.trigger?(:B)
    update_cursor
    end
    #--------------------------------------------------------------------------
    # ● セーブファイル[決定]
    #--------------------------------------------------------------------------
    def on_savefile_ok
    end
    #--------------------------------------------------------------------------
    # ● セーブファイル[キャンセル]
    #--------------------------------------------------------------------------
    #def on_savefile_cancel
    # Sound.play_cancel
    # return_scene
    #end
    #--------------------------------------------------------------------------
    # ● カーソルの更新
    #--------------------------------------------------------------------------
    def update_cursor
    last_index = @index
    cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN)
    cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP)
    cursor_pagedown if Input.trigger?(:R)
    cursor_pageup if Input.trigger?(:L)
    if @index != last_index
    Sound.play_cursor
    @savefile_windows[last_index].selected = false
    @savefile_windows[@index].selected = true
    end
    end
    #--------------------------------------------------------------------------
    # ● カーソルを下に移動
    #--------------------------------------------------------------------------
    def cursor_down(wrap)
    @index = (@index + 1) % item_max if @index < item_max - 1 || wrap
    ensure_cursor_visible
    end
    #--------------------------------------------------------------------------
    # ● カーソルを上に移動
    #--------------------------------------------------------------------------
    def cursor_up(wrap)
    @index = (@index - 1 + item_max) % item_max if @index > 0 || wrap
    ensure_cursor_visible
    end
    #--------------------------------------------------------------------------
    # ● カーソルを 1 ページ後ろに移動
    #--------------------------------------------------------------------------
    def cursor_pagedown
    if top_index + visible_max < item_max
    self.top_index += visible_max
    @index = [@index + visible_max, item_max - 1].min
    end
    end
    #--------------------------------------------------------------------------
    # ● カーソルを 1 ページ前に移動
    #--------------------------------------------------------------------------
    def cursor_pageup
    if top_index > 0
    self.top_index -= visible_max
    @index = [@index - visible_max, 0].max
    end
    end
    #--------------------------------------------------------------------------
    # ● カーソル位置が画面内になるようにスクロール
    #--------------------------------------------------------------------------
    def ensure_cursor_visible
    self.top_index = index if index < top_index
    self.bottom_index = index if index > bottom_index
    end
    end
  • profile
    북극토끼 2014.07.22 19:16
    Scene_File을 교체해서 시험해보세요
  • ?
    작삼 2014.07.22 20:40
    정말 ㄳ합니다 ㅠ

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12448
기본툴 사용법 RMVXA 저장화면? 메뉴키 누르면 나오는 화면 바꾸기 1 file 권빙구 2019.06.27 282
기타 저장함이 뭡니까? 3 블리치 2012.04.24 2572
RMXP 저장할려는데자꾸팅겨요ㄷㄷ ★☆★빤짝이☆★☆ 2010.11.18 594
RMVX 저장용 슬롯을 늘리고 싶어요. 1 지나기 2016.01.12 192
RMVX 저장및 로드시 캐릭터들이 보이지 않는 방법 4 file request 2015.09.09 249
RMMV 저장데이터 회원 가시밭 2015.11.02 97
RMXP 저장공간 제한.. 2 the레드 2010.09.12 1707
RMMV 저장/로드화면 레이아웃 바꾸려고 합니다. 2 file 리제트 2017.11.14 180
이벤트 작성 RMVX 저장/로드시 특정스위치를 OFF시킬방법 or 로드시 페이드아웃 실행 ji01345 2019.11.03 80
RMVXA 저장 후 만들어지는 데이터 숨기는 법 좀 알려주세요 ㅠ 작삼 2014.11.13 271
RMVXA 저장 창 오픈 시 나오는 일어를 한글로 번역하고싶어요 2 file 파랑빛 2016.07.15 321
RMVX 저장 제한 1 파프리카 2014.07.20 556
RMVXA 저장 시 캐릭터칩이 너무 커서 몸이 잘린 채로 표시됩니다. 4 file 라니에타 2015.07.12 405
RMVXA 저장 시 캐릭터가아닌 페이스 가 나오게 할 수 있나요? 1 file 파랑빛 2016.08.16 168
RMVXA 저장 시 취소가 불가능하게 하는 방법 8 작삼 2014.07.22 610
스크립트 작성 RMVXA 저장 스크린이 열릴 때에만 커서 효과음이 바뀌게 하는 법 슈필러 2019.07.07 57
RMXP 저장 세이브만 하면 이렇게 튕겨요 ㅠㅠ 5 file 후라이팬샷 2013.09.17 1033
RMVX 저장 불가능하게 하는 방법좀 알려주세요 1 위니크로스 2011.02.19 656
RMVXA 저장 변수 출력 은호 2014.06.08 533
RMVXA 저장 버튼 화면에 띄우는법 1 슈필러 2018.05.21 154
Board Pagination Prev 1 ... 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 ... 516 Next
/ 516