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
| #==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
# This window is for displaying the status of party members on the battle
# screen.
#==============================================================================
class Window_BattleStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, window_width, window_height)
refresh
self.openness = 0
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
Graphics.width - 128
end
#--------------------------------------------------------------------------
# * Get Window Height
#--------------------------------------------------------------------------
def window_height
fitting_height(visible_line_number)
end
#--------------------------------------------------------------------------
# * Get Number of Lines to Show
#--------------------------------------------------------------------------
def visible_line_number
return 4
end
#--------------------------------------------------------------------------
# * Get Number of Items
#--------------------------------------------------------------------------
def item_max
$game_party.battle_members.size
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_all_items
end
#--------------------------------------------------------------------------
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(index)
actor = $game_party.battle_members[index]
draw_basic_area(basic_area_rect(index), actor)
draw_gauge_area(gauge_area_rect(index), actor)
end
#--------------------------------------------------------------------------
# * Get Basic Area Retangle
#--------------------------------------------------------------------------
def basic_area_rect(index)
rect = item_rect_for_text(index)
rect.width -= gauge_area_width + 10
rect
end
#--------------------------------------------------------------------------
# * Get Gauge Area Rectangle
#--------------------------------------------------------------------------
def gauge_area_rect(index)
rect = item_rect_for_text(index)
rect.x += rect.width - gauge_area_width
rect.width = gauge_area_width
rect
end
#--------------------------------------------------------------------------
# * Get Gauge Area Width
#--------------------------------------------------------------------------
def gauge_area_width
return 220
end
#--------------------------------------------------------------------------
# * Draw Basic Area (+ niveau du combattant)
#--------------------------------------------------------------------------
def draw_basic_area(rect, actor)
draw_actor_name(actor, rect.x + 0, rect.y, 100)
draw_actor_icons(actor, rect.x + 56, rect.y, rect.width - 80)
draw_actor_level(actor, rect.x + 96, rect.y) # Ligne en +
end
#--------------------------------------------------------------------------
# * Draw Gauge Area
#--------------------------------------------------------------------------
def draw_gauge_area(rect, actor)
if $data_system.opt_display_tp
draw_gauge_area_with_tp(rect, actor)
else
draw_gauge_area_without_tp(rect, actor)
end
end
#--------------------------------------------------------------------------
# * Draw Gauge Area (with TP)
#--------------------------------------------------------------------------
def draw_gauge_area_with_tp(rect, actor)
draw_actor_hp(actor, rect.x + 0, rect.y, 72)
draw_actor_mp(actor, rect.x + 82, rect.y, 64)
draw_actor_tp(actor, rect.x + 156, rect.y, 64)
end
#--------------------------------------------------------------------------
# * Draw Gauge Area (without TP)
#--------------------------------------------------------------------------
def draw_gauge_area_without_tp(rect, actor)
draw_actor_hp(actor, rect.x + 0, rect.y, 134)
draw_actor_mp(actor, rect.x + 144, rect.y, 76)
end
end
|