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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
| #==============================================================================
# ¡ Window_RingMenu
#==============================================================================
#==============================================================================
# Edited by MakirouAru mofifier par boushy
#==============================================================================
class Window_RingMenu < Window_Base
#--------------------------------------------------------------------------
# › ƒNƒ‰ƒX’è”
#--------------------------------------------------------------------------
STARTUP_FRAMES = 20 # ‰ŠúƒAƒjƒ[ƒVƒ‡ƒ“‚̃tƒŒ[ƒ€”
MOVING_FRAMES = 5 # ƒŠƒ“ƒO‚ð‰ñ‚µ‚½Žž‚̃tƒŒ[ƒ€”
RING_R = 64 # ƒŠƒ“ƒO‚Ì”¼Œa
ICON_ITEM = RPG::Cache.icon("034-Item03") # uƒAƒCƒeƒ€vƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_SKILL = RPG::Cache.icon("044-Skill01") # uƒXƒLƒ‹vƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_EQUIP = RPG::Cache.icon("001-Weapon01") # u‘•”õvƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_STATUS = RPG::Cache.icon("050-Skill07") # uƒXƒe[ƒ^ƒXvƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_SAVE = RPG::Cache.icon("038-Item07") # uƒZ[ƒuvƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_EXIT = RPG::Cache.icon("046-Skill03") # uI—¹vƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_DISABLE= RPG::Cache.icon("") # Žg—p‹ÖŽ~€–Ú‚É•t‚ƒAƒCƒRƒ“
SE_STARTUP = "056-Right02" # ƒƒjƒ…[‚ðŠJ‚¢‚½‚Æ‚«‚ɖ‚炷SE
MODE_START = 1 # ƒXƒ^[ƒgƒAƒbƒvƒAƒjƒ[ƒVƒ‡ƒ“
MODE_WAIT = 2 # ‘Ò‹@
MODE_MOVER = 3 # ŽžŒv‰ñ‚è‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“
MODE_MOVEL = 4 # ”½ŽžŒv‰ñ‚è‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“
#--------------------------------------------------------------------------
# › ƒAƒNƒZƒT
#--------------------------------------------------------------------------
attr_accessor :index
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize( center_x, center_y )
super(0, 0, 640, 480)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = "Arial"
self.opacity = 0
self.back_opacity = 0
s1 = "Objet"
s2 = "Compétence"
s3 = "Equiper"
s4 = "Etat"
s5 = "Sauvegarder"
s6 = "Quitter"
@commands = [ s1, s2, s3, s4, s5, s6 ]
@item_max = 6
@index = 0
@items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ]
@disabled = [ false, false, false, false, false, false ]
@cx = center_x - 16
@cy = center_y - 16
setup_move_start
refresh
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
super
refresh
end
#--------------------------------------------------------------------------
# œ ‰æ–ÊÄ•`‰æ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# ƒAƒCƒRƒ“‚ð•`‰æ
case @mode
when MODE_START
refresh_start
when MODE_WAIT
refresh_wait
when MODE_MOVER
refresh_move(1)
when MODE_MOVEL
refresh_move(0)
end
# ƒAƒNƒeƒBƒu‚ȃRƒ}ƒ“ƒh–¼•\Ž¦
rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
self.contents.draw_text(rect, @commands[@index],1)
end
#--------------------------------------------------------------------------
# › ‰æ–ÊÄ•`‰æ(‰Šú‰»Žž)
#--------------------------------------------------------------------------
def refresh_start
d1 = 2.0 * Math::PI / @item_max
d2 = 1.0 * Math::PI / STARTUP_FRAMES
r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( r * Math.sin( d ) ).to_i
y = @cy - ( r * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# › ‰æ–ÊÄ•`‰æ(‘Ò‹@Žž)
#--------------------------------------------------------------------------
def refresh_wait
d = 2.0 * Math::PI / @item_max
for i in 0...@item_max
j = i - @index
x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
draw_item(x, y, i)
end
end
#--------------------------------------------------------------------------
# › ‰æ–ÊÄ•`‰æ(‰ñ“]Žž)
# mode : 0=”½ŽžŒv‰ñ‚è 1=ŽžŒv‰ñ‚è
#--------------------------------------------------------------------------
def refresh_move( mode )
d1 = 2.0 * Math::PI / @item_max
d2 = d1 / MOVING_FRAMES
d2 *= -1 if mode != 0
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( RING_R * Math.sin( d ) ).to_i
y = @cy - ( RING_R * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# œ €–Ú‚Ì•`‰æ
# x :
# y :
# i : €–Ú”Ô†
#--------------------------------------------------------------------------
def draw_item(x, y, i)
#p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s
rect = Rect.new(0, 0, @items[i].width, @items[i].height)
if @index == i
self.contents.blt( x, y, @items[i], rect )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect )
end
else
self.contents.blt( x, y, @items[i], rect, 128 )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
end
end
end
#--------------------------------------------------------------------------
# œ €–ڂ𖳌ø‚É‚·‚é
# index : €–Ú”Ô†
#--------------------------------------------------------------------------
def disable_item(index)
@disabled[index] = true
end
#--------------------------------------------------------------------------
# › ‰Šú‰»ƒAƒjƒ[ƒVƒ‡ƒ“‚Ì€”õ
#--------------------------------------------------------------------------
def setup_move_start
@mode = MODE_START
@steps = STARTUP_FRAMES
if SE_STARTUP != nil and SE_STARTUP != ""
Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
end
end
#--------------------------------------------------------------------------
# › ‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“‚Ì€”õ
#--------------------------------------------------------------------------
def setup_move_move(mode)
if mode == MODE_MOVER
@index -= 1
@index = @items.size - 1 if @index < 0
elsif mode == MODE_MOVEL
@index += 1
@index = 0 if @index >= @items.size
else
return
end
@mode = mode
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# › ƒAƒjƒ[ƒVƒ‡ƒ“’†‚©‚Ç‚¤‚©
#--------------------------------------------------------------------------
def animation?
return @mode != MODE_WAIT
end
end
#==============================================================================
# ¡ Window_MenuStatus
#------------------------------------------------------------------------------
# @ƒƒjƒ…[‰æ–ʂŃp[ƒeƒBƒƒ“ƒo[‚̃Xƒe[ƒ^ƒX‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================
class Window_RingMenuStatus < Window_Base
#--------------------------------------------------------------------------
# › ƒNƒ‰ƒX’è”
#--------------------------------------------------------------------------
STARTUP_FRAMES = 20 # ‰ŠúƒAƒjƒ[ƒVƒ‡ƒ“‚̃tƒŒ[ƒ€”
MOVING_FRAMES = 5 # ƒŠƒ“ƒO‚ð‰ñ‚µ‚½Žž‚̃tƒŒ[ƒ€”
RING_R = 64 # ƒŠƒ“ƒO‚Ì”¼Œa
ICON_SKILL = RPG::Cache.icon("044-Skill01") # uƒXƒLƒ‹vƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_EQUIP = RPG::Cache.icon("001-Weapon01") # u‘•”õvƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_STATUS = RPG::Cache.icon("050-Skill07") # uƒXƒe[ƒ^ƒXvƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_SAVE = RPG::Cache.icon("038-Item07") # uƒZ[ƒuvƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_EXIT = RPG::Cache.icon("046-Skill03") # uI—¹vƒƒjƒ…[‚̃AƒCƒRƒ“
ICON_DISABLE= RPG::Cache.icon("") # Žg—p‹ÖŽ~€–Ú‚É•t‚ƒAƒCƒRƒ“
SE_STARTUP = "056-Right02" # ƒƒjƒ…[‚ðŠJ‚¢‚½‚Æ‚«‚ɖ‚炷SE
MODE_START = 1 # ƒXƒ^[ƒgƒAƒbƒvƒAƒjƒ[ƒVƒ‡ƒ“
MODE_WAIT = 2 # ‘Ò‹@
MODE_MOVER = 3 # ŽžŒv‰ñ‚è‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“
MODE_MOVEL = 4 # ”½ŽžŒv‰ñ‚è‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“
#--------------------------------------------------------------------------
# › ƒAƒNƒZƒT
#--------------------------------------------------------------------------
attr_accessor :index
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize( center_x, center_y )
actor=$game_party.actors[0]
if actor !=nil
bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
end
actor1=$game_party.actors[1]
if actor1 !=nil
bitmap1 = RPG::Cache.character(actor1.character_name, actor.character_hue)
end
actor2=$game_party.actors[2]
if actor2 !=nil
bitmap2 = RPG::Cache.character(actor2.character_name, actor.character_hue)
end
actor3=$game_party.actors[3]
if actor3 !=nil
bitmap3 = RPG::Cache.character(actor3.character_name, actor.character_hue)
end
super(0, 0, 640, 480)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = "Arial"
self.opacity = 0
self.back_opacity = 0
if $game_party.actors.size==4
s1 = actor.name
s2 = actor1.name
s3 = actor2.name
s4 = actor3.name
@commands = [ s1, s2, s3, s4]
else
if $game_party.actors.size==3
s1 = actor.name
s2 = actor1.name
s3 = actor2.name
@commands = [ s1, s2, s3]
else
if $game_party.actors.size==2
s1 = actor.name
s2 = actor1.name
@commands = [ s1, s2]
else
if $game_party.actors.size==1
s1 = actor.name
@commands = [ s1]
else
if $game_party.actors.size==0
@commands = [ ]
end
end
end
end
end
@item_max = 4
if actor3 ==nil
@item_max = 3
end
if actor2 ==nil and actor3 ==nil
@item_max = 2
end
if actor1 ==nil and actor2 ==nil and actor3 ==nil
@item_max = 1
end
if actor ==nil and actor1 ==nil and actor2 ==nil and actor3 ==nil
@item_max = 0
end
@index = 0
if $game_party.actors.size==4
@items = [ bitmap,bitmap1,bitmap2,bitmap3]
end
if $game_party.actors.size==3
@items = [ bitmap, bitmap1, bitmap2]
end
if $game_party.actors.size==2
@items = [ bitmap, bitmap1]
end
if $game_party.actors.size==1
@items = [ bitmap]
end
if $game_party.actors.size==0
@items = [ ]
end
@disabled = [ false, false, false, false, false, false ]
@cx = center_x - 16
@cy = center_y - 16
setup_move_start
refresh
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV actor = $game_party.actors[i]
#draw_actor_graphic(actor, x - 40, y + 80)
#--------------------------------------------------------------------------
def update
super
refresh
end
#--------------------------------------------------------------------------
# œ ‰æ–ÊÄ•`‰æ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# ƒAƒCƒRƒ“‚ð•`‰æ
case @mode
when MODE_START
refresh_start
when MODE_WAIT
refresh_wait
when MODE_MOVER
refresh_move(1)
when MODE_MOVEL
refresh_move(0)
end
# ƒAƒNƒeƒBƒu‚ȃRƒ}ƒ“ƒh–¼•\Ž¦
rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
self.contents.draw_text(rect, @commands[@index],1)
end
#--------------------------------------------------------------------------
# › ‰æ–ÊÄ•`‰æ(‰Šú‰»Žž)
#--------------------------------------------------------------------------
def refresh_start
d1 = 2.0 * Math::PI / @item_max
d2 = 1.0 * Math::PI / STARTUP_FRAMES
r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( r * Math.sin( d ) ).to_i
y = @cy - ( r * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# › ‰æ–ÊÄ•`‰æ(‘Ò‹@Žž)
#--------------------------------------------------------------------------
def refresh_wait
d = 2.0 * Math::PI / @item_max
for i in 0...@item_max
j = i - @index
x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
draw_item(x, y, i)
end
end
#--------------------------------------------------------------------------
# › ‰æ–ÊÄ•`‰æ(‰ñ“]Žž)
# mode : 0=”½ŽžŒv‰ñ‚è 1=ŽžŒv‰ñ‚è
#--------------------------------------------------------------------------
def refresh_move( mode )
d1 = 2.0 * Math::PI / @item_max
d2 = d1 / MOVING_FRAMES
d2 *= -1 if mode != 0
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( RING_R * Math.sin( d ) ).to_i
y = @cy - ( RING_R * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# œ €–Ú‚Ì•`‰æ
# x :
# y :
# i : €–Ú”Ô†
#--------------------------------------------------------------------------
def draw_item(x, y, i)
#p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s
cw = @items[i].width / 4
ch = @items[i].height / 9#4 pour taille normal
rect = Rect.new(0, 0, cw, ch)
if @index == i
self.contents.blt( x, y, @items[i], rect )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect )
end
else
self.contents.blt( x, y, @items[i], rect, 128 )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
end
end
end
#--------------------------------------------------------------------------
# œ €–ڂ𖳌ø‚É‚·‚é
# index : €–Ú”Ô†
#--------------------------------------------------------------------------
def disable_item(index)
@disabled[index] = true
end
#--------------------------------------------------------------------------
# › ‰Šú‰»ƒAƒjƒ[ƒVƒ‡ƒ“‚Ì€”õ
#--------------------------------------------------------------------------
def setup_move_start
@mode = MODE_START
@steps = STARTUP_FRAMES
if SE_STARTUP != nil and SE_STARTUP != ""
Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
end
end
#--------------------------------------------------------------------------
# › ‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“‚Ì€”õ
#--------------------------------------------------------------------------
def setup_move_move(mode)
if mode == MODE_MOVER
@index -= 1
@index = @items.size - 1 if @index < 0
elsif mode == MODE_MOVEL
@index += 1
@index = 0 if @index >= @items.size
else
return
end
@mode = mode
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# › ƒAƒjƒ[ƒVƒ‡ƒ“’†‚©‚Ç‚¤‚©
#--------------------------------------------------------------------------
def animation2?
return @mode != MODE_WAIT
end
end
#==============================================================================
# #¡ Scene_RingMenu
# ¡ Scene_Menu
#------------------------------------------------------------------------------
# @ƒƒjƒ…[‰æ–ʂ̈—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================
#class Scene_RingMenu
class Scene_Menu
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# menu_index : ƒRƒ}ƒ“ƒh‚̃J[ƒ\ƒ‹‰ŠúˆÊ’u
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# œ ƒƒCƒ“ˆ—
#--------------------------------------------------------------------------
def main
# ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ðì¬
@spriteset = Spriteset_Map.new
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðì¬
px = $game_player.screen_x - 15
py = $game_player.screen_y - 24
@command_window = Window_RingMenu.new(px,py)
@command_window.index = @menu_index
# ƒp[ƒeƒBl”‚ª 0 l‚Ìê‡
if $game_party.actors.size == 0
# ƒAƒCƒeƒ€AƒXƒLƒ‹A‘•”õAƒXƒe[ƒ^ƒX‚𖳌ø‰»
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
@command_window.z = 100
# ƒZ[ƒu‹ÖŽ~‚Ìê‡
if $game_system.save_disabled
# ƒZ[ƒu‚𖳌ø‚É‚·‚é
@command_window.disable_item(4)
end
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðì¬
px2 = $game_player.screen_x - 15
py2 = $game_player.screen_y - 24
@status_window = Window_RingMenuStatus.new(px2,py2)
@status_window.visible = false
# ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs
Graphics.transition
# ƒƒCƒ“ƒ‹[ƒv
loop do
# ƒQ[ƒ€‰æ–Ê‚ðXV
Graphics.update
# “ü—Íî•ñ‚ðXV
Input.update
# ƒtƒŒ[ƒ€XV
update
# ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’f
if $scene != self
break
end
end
# ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õ
Graphics.freeze
# ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ð‰ð•ú
@spriteset.dispose
# ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
@command_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
# ƒEƒBƒ“ƒhƒE‚ðXV
@command_window.update
@status_window.update
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡: update_command ‚ðŒÄ‚Ô
if @command_window.active
update_command
return
end
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡: update_status ‚ðŒÄ‚Ô
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡)
#--------------------------------------------------------------------------
def update_command
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# ƒ}ƒbƒv‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_Map.new
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒp[ƒeƒBl”‚ª 0 l‚ÅAƒZ[ƒuAƒQ[ƒ€I—¹ˆÈŠO‚̃Rƒ}ƒ“ƒh‚Ìê‡
if $game_party.actors.size == 0 and @command_window.index < 4
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
case @command_window.index
when 0 # ƒAƒCƒeƒ€
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒAƒCƒeƒ€‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_Item.new
when 1 # ƒXƒLƒ‹
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 2 # ‘•”õ
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 3 # ƒXƒe[ƒ^ƒX
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 4 # ƒZ[ƒu
# ƒZ[ƒu‹ÖŽ~‚Ìê‡
if $game_system.save_disabled
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒZ[ƒu‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_Save.new
when 5 # ƒQ[ƒ€I—¹
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒQ[ƒ€I—¹‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_End.new
end
return
end
# ƒAƒjƒ[ƒVƒ‡ƒ“’†‚È‚çƒJ[ƒ\ƒ‹‚̈—‚ðs‚í‚È‚¢
return if @command_window.animation?
# ªor© ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.press?(Input::UP) or Input.press?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)
return
end
# «or¨ ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.press?(Input::DOWN) or Input.press?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
@command_window.setup_move_move(Window_RingMenu::MODE_MOVER)
return
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡)
#--------------------------------------------------------------------------
def update_status2
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = true
@status_window.active = false
@status_window.visible = false
@status_window.index = -1
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
case @command_window.index
when 1 # ƒXƒLƒ‹
# ‚±‚̃AƒNƒ^[‚Ìs“®§ŒÀ‚ª 2 ˆÈã‚Ìê‡
if $game_party.actors[@status_window.index].restriction >= 2
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒLƒ‹‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_Skill.new(@status_window.index)
when 2 # ‘•”õ
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ‘•”õ‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_Equip.new(@status_window.index)
when 3 # ƒXƒe[ƒ^ƒX
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒX‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
def update_status
@command_window.visible=false
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# ƒ}ƒbƒv‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_Menu.new
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒp[ƒeƒBl”‚ª 0 l‚ÅAƒZ[ƒuAƒQ[ƒ€I—¹ˆÈŠO‚̃Rƒ}ƒ“ƒh‚Ìê‡
if $game_party.actors.size == 0 and @command_window.index < 4
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
case @command_window.index
when 0 # ƒAƒCƒeƒ€
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒAƒCƒeƒ€‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_Item.new
when 1 # ƒXƒLƒ‹
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
$scene = Scene_Skill.new(@status_window.index)
when 2 # ‘•”õ
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
$scene = Scene_Equip.new(@status_window.index)
when 3 # ƒXƒe[ƒ^ƒX
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
$scene = Scene_Status.new(@status_window.index)
when 4 # ƒZ[ƒu
# ƒZ[ƒu‹ÖŽ~‚Ìê‡
if $game_system.save_disabled
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒZ[ƒu‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_Save.new
when 5 # ƒQ[ƒ€I—¹
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒQ[ƒ€I—¹‰æ–Ê‚ÉØ‚è‘Ö‚¦
$scene = Scene_End.new
end
return
end
# ƒAƒjƒ[ƒVƒ‡ƒ“’†‚È‚çƒJ[ƒ\ƒ‹‚̈—‚ðs‚í‚È‚¢
return if @status_window.animation2?
# ªor© ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.press?(Input::UP) or Input.press?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@status_window.setup_move_move(Window_RingMenuStatus::MODE_MOVEL)
return
end
# «or¨ ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.press?(Input::DOWN) or Input.press?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
@status_window.setup_move_move(Window_RingMenuStatus::MODE_MOVER)
return
end
end
end |