질문과 답변

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 게임 제작 후 실행법 2 Mop 2017.07.13 98
RMVXA 게임 종료 스크립트좀 알려주십시오 3 Chomsky 2014.02.26 625
RMVXA 게임 진행정도에 따라 메뉴/아이템창에 나타나는 이미지를 바꾸고 싶습니다 file gillin 2016.06.04 171
RMVXA 게임 진행중 이벤트로 케릭터 자체를 바꾸는 방법좀 알려주세요 2 clown1 2012.08.29 1095
RMVXA 게임 창이 갑자기 늘어났어요 1 file Leonis 2014.11.21 283
RMVXA 게임 처음 시작할때 효과넣는법 1 Cenzi 2014.05.21 723
RMVXA 게임 클리어 보상? 1 테르니아 2015.10.22 134
RMVXA 게임 타이틀 꾸미기 방법 ? 1 니꺼해 2017.12.31 237
RMVXA 게임 타이틀에서 이어하기를 눌렀을 때 파일1로 자동으로 눌려 실행하는 것에 대한... 스컬늑대 2013.03.04 662
RMVXA 게임 테스트플레이 오류 4 xzrjs 2012.09.13 1108
기본툴 사용법 RMVXA 게임 툴 화면 크기에 대해서 1 file 머리큰두두 2023.01.11 86
RMVXA 게임 프로젝트 파일의 확장자 2 파닥이 2014.01.15 1015
RMVXA 게임 한글화 도중 스크립트 오류 질문 드립니다. file 발렌 2015.10.05 372
RMVXA 게임 해상도를 스크립트로 조절할 수 있나요? 2 환상벌레 2013.12.09 981
RMVXA 게임 화면 크기설정 9 cchandelier 2016.09.05 1362
RMVXA 게임 화면 타이틀 글자 없애는 방법이 뭔가요? 2 은이하롄 2018.02.09 265
RMVXA 게임 화면; 2 file 세실리안 2013.12.26 882
RMVXA 게임 화면에서 검정색 여백 화면 못 없애나요? 2 file tjin 2012.12.27 1358
RMVXA 게임내에 사용되는 파일명을 한글로 해도되나요? 4 고슴도 2015.03.21 227
RMVXA 게임내에서 SE 파일이 0.5초 정도 늦게 재생되네요 3 체다렐라모짜치즈 2018.08.06 82
Board Pagination Prev 1 ... 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 ... 149 Next
/ 149