สคริปต์ Save Confirmation Window
หน้า 1 จาก 1
สคริปต์ Save Confirmation Window
แปะสคริปต์ ๆ *O* หน้าต่างคอนเฟิร์มตอนเซฟไฟล์ กรณีกันผู้เล่นเผลอเซฟไฟล์ทับของเก่า =w=~
CODE
#==============================================================================
# [VX] Save File Confirmation
#------------------------------------------------------------------------------
# by Woratana
# Released on: 15/02/2008
#
# Make a Confirmation Window before save file...
#==============================================================================
module Worale
SFC_Text_Confirm = 'Confirm to save...' # Text to confirm to save file
SFC_Text_Cancel = 'Cancel saving process' # Text to cancel to save
SFC_Window_Width = 200 # Width of Confirmation Window
SFC_Window_X_Offset = 0 # Move Confirmation Window horizontally
SFC_Window_Y_Offset = 0 # Move Confirmation Window vertically
end
class Scene_File < Scene_Base
def update
super
if !@confirm_window.nil?
@confirm_window.update
if Input.trigger?(Input::C)
if @confirm_window.index == 0
determine_savefile
@confirm_window.dispose
@confirm_window = nil
else
Sound.play_cancel
@confirm_window.dispose
@confirm_window = nil
end
elsif Input.trigger?(Input::B)
Sound.play_cancel
@confirm_window.dispose
@confirm_window = nil
end
else
update_menu_background
@help_window.update
update_savefile_windows
update_savefile_selection
end
end
def update_savefile_selection
if Input.trigger?(Input::C)
if @saving and @savefile_windows[@index].file_exist
Sound.play_decision
text1 = Worale::SFC_Text_Confirm
text2 = Worale::SFC_Text_Cancel
@confirm_window = Window_Command.new(Worale::SFC_Window_Width,[text1,text2])
@confirm_window.x = ((544 - @confirm_window.width) / 2) + Worale::SFC_Window_X_Offset
@confirm_window.y = ((416 - @confirm_window.height) / 2) + Worale::SFC_Window_Y_Offset
else
determine_savefile
end
elsif Input.trigger?(Input::B)
Sound.play_cancel
return_scene
else
last_index = @index
if Input.repeat?(Input::DOWN)
cursor_down(Input.trigger?(Input::DOWN))
end
if Input.repeat?(Input::UP)
cursor_up(Input.trigger?(Input::UP))
end
if @index != last_index
Sound.play_cursor
@savefile_windows[last_index].selected = false
@savefile_windows[@index].selected = true
end
end
end
end
เครดิต วอราม่อน
CODE
#==============================================================================
# [VX] Save File Confirmation
#------------------------------------------------------------------------------
# by Woratana
# Released on: 15/02/2008
#
# Make a Confirmation Window before save file...
#==============================================================================
module Worale
SFC_Text_Confirm = 'Confirm to save...' # Text to confirm to save file
SFC_Text_Cancel = 'Cancel saving process' # Text to cancel to save
SFC_Window_Width = 200 # Width of Confirmation Window
SFC_Window_X_Offset = 0 # Move Confirmation Window horizontally
SFC_Window_Y_Offset = 0 # Move Confirmation Window vertically
end
class Scene_File < Scene_Base
def update
super
if !@confirm_window.nil?
@confirm_window.update
if Input.trigger?(Input::C)
if @confirm_window.index == 0
determine_savefile
@confirm_window.dispose
@confirm_window = nil
else
Sound.play_cancel
@confirm_window.dispose
@confirm_window = nil
end
elsif Input.trigger?(Input::B)
Sound.play_cancel
@confirm_window.dispose
@confirm_window = nil
end
else
update_menu_background
@help_window.update
update_savefile_windows
update_savefile_selection
end
end
def update_savefile_selection
if Input.trigger?(Input::C)
if @saving and @savefile_windows[@index].file_exist
Sound.play_decision
text1 = Worale::SFC_Text_Confirm
text2 = Worale::SFC_Text_Cancel
@confirm_window = Window_Command.new(Worale::SFC_Window_Width,[text1,text2])
@confirm_window.x = ((544 - @confirm_window.width) / 2) + Worale::SFC_Window_X_Offset
@confirm_window.y = ((416 - @confirm_window.height) / 2) + Worale::SFC_Window_Y_Offset
else
determine_savefile
end
elsif Input.trigger?(Input::B)
Sound.play_cancel
return_scene
else
last_index = @index
if Input.repeat?(Input::DOWN)
cursor_down(Input.trigger?(Input::DOWN))
end
if Input.repeat?(Input::UP)
cursor_up(Input.trigger?(Input::UP))
end
if @index != last_index
Sound.play_cursor
@savefile_windows[last_index].selected = false
@savefile_windows[@index].selected = true
end
end
end
end
เครดิต วอราม่อน
Similar topics
» [สคริปต์] Window Help Avanado
» สคริปต์ VX Quick Save
» [สคริปต์] Law's Custom Save System (หน้าจอเซฟเกมแบบใหม่)
» [สคริปต์]Save ScreenShot เกมส์
» คอมมันไม่รับเกมส์ที่มีสคริป full window ทำไงดี
» สคริปต์ VX Quick Save
» [สคริปต์] Law's Custom Save System (หน้าจอเซฟเกมแบบใหม่)
» [สคริปต์]Save ScreenShot เกมส์
» คอมมันไม่รับเกมส์ที่มีสคริป full window ทำไงดี
หน้า 1 จาก 1
Permissions in this forum:
คุณไม่สามารถพิมพ์ตอบ