질문과 답변

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 21139
RM2k 적 처치시 변수가 올라가는 이벤트를 구현할 수 있을까요..? 6 WithBerserker 2016.07.31 300
RMMV 적 전멸 후 난입 5 zero? 2016.10.23 211
턴제 전투 RMVXA 적 선택시 화살표 Sa0327 2020.03.04 88
턴제 전투 RMMV 적 배치에 관해서 질문이 있습니다 file Wolf君 2024.01.11 86
RMXP 적 몬스터 HP가 " 999999 " 으로 되어있잔아요 그 이상으로하는 스크립트 없나요? 4 난몰라 2012.01.20 2440
RMVXA 적 능력치로 적에게 데미지 주기 2 테오드라 2016.02.11 145
RMVX 적 그룹에서 적 캐릭터를 랜덤으로 나오게끔 하는 방법좀 부탁드립니다 2 이억팔천 2012.10.28 888
RMVXA 적 그룹 정렬에 대해 구리더 2013.07.10 781
턴제 전투 RMVXA 적 공격 시 자신에게도 반동 데미지가 가게 하는 방법 1 할짓없는인간 2019.05.06 116
이벤트 작성 RMMV 적 AI 관련 질문 6 file pokapoka 2023.08.11 136
RMVXA 저해상도 게임 화면의 확대 방법에 대해서 질문 드립니다. :) LSW.indie 2018.09.23 209
RMVX 저주받은 갑옷 구현 2 FNS키리토 2012.06.26 2670
RMVX 저좀 도와주세요..ㅠㅠ 2 file 닥훈이 2011.06.26 844
기타 저좀 도와주세요 !!!! 2 CheckMates 2011.01.13 1075
기본툴 사용법 RMVXA 저장화면? 메뉴키 누르면 나오는 화면 바꾸기 1 file 권빙구 2019.06.27 311
기타 저장함이 뭡니까? 3 블리치 2012.04.24 2583
RMXP 저장할려는데자꾸팅겨요ㄷㄷ ★☆★빤짝이☆★☆ 2010.11.18 599
RMVX 저장용 슬롯을 늘리고 싶어요. 1 지나기 2016.01.12 198
RMVX 저장및 로드시 캐릭터들이 보이지 않는 방법 4 file request 2015.09.09 257
RMMV 저장데이터 회원 가시밭 2015.11.02 116
Board Pagination Prev 1 ... 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 ... 518 Next
/ 518