1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
| #==============================================================================
# [VX] Save File Confirmation
#------------------------------------------------------------------------------
# by Woratana
# Released on: 15/02/2008
#
# Make a Confirmation Window before save file...
#==============================================================================
module Worale
SFC_Text_Confirm = 'Sauvegarder...' # Text to confirm to save file
SFC_Text_Cancel = 'Annuler' # 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
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 |