질문과 답변

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 13943
RMVXA 한글 패치가 이상합니다 3 file 온리 2014.07.27 685
RMVXA 그림을 맵에 고정 시키는법이 있었던것같은데 어떻게하는 거죠 .. 9 file CJY 2014.07.26 1131
RMVX 게임을 할 때 특정 키로 대사 불러오는 스크립트를 작성할 때 그 대사가 담긴 <대사 데이터> 만드는 방법 질문.. 1 file sojena 2014.07.26 806
RMVXA 겜제작중에세이브파일 1 뻘짓대마왕 2014.07.26 555
라이선스 RM2k 쯔꾸르를 5-6년만에 다시 만지게 되었는데, 제작자분들께서 공유해주신 맵칩과 캐릭터 오브젝트는 모두 사용해도 되는건가요? 4 빵상군 2014.07.26 957
RMVXA 세이브 파일 갯수 설정 2 작삼 2014.07.24 881
RMVXA 자동 세이브가 가능하게 하는 방법 1 작삼 2014.07.24 700
RMVX RPG VX로 제작된 게임들의 배경음이 안나오네요 ehfhfh4 2014.07.24 658
기타 폰트 관련(ㅁㅁ자) 1 file 닉네월드 2014.07.24 1263
RMVXA rpgvxace 사이드뷰 액션 설정법 슈퍼울트라그레이트딜리셔스 2014.07.23 729
RMVX 적을 쓰러뜨려도 배틀러 이미지가 사라지질 않습니다. MMM 2014.07.23 538
RPG VX Ace 이벤트커맨드 중 고급의 스크립트는 어떻게 활용하나요? 4 file 유변세변능력자ek 2014.07.22 2418
RMVX 메뉴창들을 투명하게 할 수 있는 스크립트 위치를 모르겠습니다. 4 file 1년이지났네 2014.07.22 1185
RMVXA 저장 시 취소가 불가능하게 하는 방법 8 작삼 2014.07.22 612
RMVXA 아이템 메뉴에서 항목선택하는 부분을 삭제하고 싶습니다 8 file 힙합전사 2014.07.21 1178
RMVXA 게임 실행시와 에디터에서 한글이 꺠집니다 2 file 프라임헌터즈 2014.07.21 909
RMVXA 제공된 타일에 대해 질문 2 file PDplayer 2014.07.21 769
RMVX 아이템을 선택했을 때만 작동하게 하는 방법 1 파프리카 2014.07.21 597
RMVX 장비 옵션이 설정한 것과 다르게 적용되는데, 왜 그런걸까요 MMM 2014.07.20 586
RMVX 저장 제한 1 파프리카 2014.07.20 559
Board Pagination Prev 1 ... 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 ... 517 Next
/ 517