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
| #==============================================================================
# ■ MenuLuna
#==============================================================================
module MenuLuna
module EquipMenu
def self.user_command_text(index, contents, item_rect, enable, select)
end
def self.user_item_text(item, contents, item_rect, enable, select)
end
def self.user_slot_text(index, item, contents, item_rect, enable, select)
end
def self.user_status_text(actor, temp_actor, contents)
end
def self.user_description_text(item, contents)
end
# return array contains text/bitmap data
# result = [
# [Text, [X, Y], [FontName, FontSize, FontBold, FontItalic], [R, G, B(, A)]],
# ]
# replace text with $bitmap[Folder, Filename] for draw bitmap
# Folder must be in Graphics and Filename must be in Folder
# For example: $bitmap[System, GoldIcon] for Graphics/System/GoldIcon.png
# Bitmap doesn't need [FontName, FontSize, FontBold, FontItalic] & [R, G, B(, A)]
# & [Width, Align] but take an opacity option
# For source rect, use bw for bitmap width, bh for bitmap height
# If Opacity and/or Src_rect, it will take opacity of 255 and bitmap original
# rect as values.
# ["$bitmap[Folder, FileName]", [X, Y], Opacity, Src_rect]
# ["$bitmap[System, GoldIcon]", [128, 0], 255, [0, 0, "bw * 0.5", "bh"]]
# ["$bitmap[System, GoldIcon]", [128, 0], 255, [0, 0, 128, 42]]
# replace $bitmap[Folder, "Filename"] with $color[R, G, B]
# for solid color background
# replace $bitmap[Folder, "Filename"] with $horgrad[R1, G1, B1, R2, G2, B2]
# for gradient color background horizontal
# replace $bitmap[Folder, "Filename"] with $vergrad[R1, G1, B1, R2, G2, B2]
# for gradient color background vertical
# replace text with $icon[index] for draw icon
# icon doesn't need [FontName, FontSize, FontBold, FontItalic] & [R, G, B(, A)]
# & [Width, Align] but take an opacity option
# ["$icon[Index]", [X, Y], Opacity]
# ["$icon[10]", [128, 0], 255]
# [X, Y] will be offsets base on item_rect
# use item as a reference for current drawing item.
# contents refers to window's contents bitmap
def self.user_command_text(index, contents, item_rect, enable, select)
end
def self.user_item_text(item, contents, item_rect, enable, select)
# Return result
if item
result = [
# [Text, [X, Y], [Width, Align], [R, G, B(, A)]], [FontName, FontSize, FontBold, FontItalic],
["$bitmap[System, SkillBoard]", [item_rect.x+2, item_rect.y+1], 255, [0, 0, "bw", "bh"]],
["$icon[#{item.icon_index}]", [item_rect.x+2, item_rect.y+2], 255],
["#{item.name}", [item_rect.x+27, item_rect.y+5], [item_rect.width-64, 0], [255, 255, 255], ["Visitor TT2 BRK", 17, false, false], [255, 255, 255, 0]],
]
end
result
end
def self.user_slot_text(index, item, contents, item_rect, enable, select)
case index
when 0; img = select ? "EquipWeapon" : "Equip_Inactive"
when 1; img = select ? "EquipShield" : "Equip_Inactive"
when 2; img = select ? "EquipOcc" : "Equip_Inactive"
when 3; img = select ? "EquipArmor" : "Equip_Inactive"
when 4; img = select ? "EquipAcc" : "Equip_Inactive"
end
bg = select ? "ItemSlot_Selected" : "ItemSlot_Normal"
result = [
["$bitmap[System, #{img}]", [-220, -12], 255, [0, 0, "bw", "bh"]],
["$bitmap[System, #{bg}]", [item_rect.x + 145, item_rect.y + 2 + 2 * index], 255, [0, 0, "bw", "bh"]],
]
if item
result.push(["$bitmap[Icons, #{item.name}]", [item_rect.x + 145, item_rect.y + 2 + 2 * index], 255, [0, 0, "bw", "bh"]],)
end
result
end
def self.user_status_text(actor, temp_actor, contents)
if actor
result = [
["$bitmap[Faces, SecondStatus_#{actor.actor.id}]", [0, 0], 255, [0, 0, "bw", "bh"]],
]
6.times { |i|
result.push(
["#{Vocab.param(i+2)}", [28, 136 + i * 30], [contents.width, 0], [229,220,145], ["Visitor TT2 BRK", 18, false, false], [255, 255, 255, 0]],
["#{actor.param(i+2)}", [96, 136 + i * 30], [contents.width, 0], [255,255,255], ["Visitor TT2 BRK", 18, false, false], [255, 255, 255, 0]],
)
}
end
if temp_actor
6.times { |i|
if temp_actor.param(i+2) > actor.param(i+2)
color = [0,183,229]
elsif temp_actor.param(i+2) == actor.param(i+2)
color = [255, 255, 255]
else
color = [255,107,79]
end
result.push(
["> #{temp_actor.param(i+2)}", [136, 136 + i * 30], [contents.width, 0], color, ["Visitor TT2 BRK", 18, false, false], [255, 255, 255, 0]],
)
}
end
result ||= []
result
end
# Text for Description Window
def self.user_description_text(item, contents)
if item
result = [
["#{item.name}",
[12, 6], [520, 0], [255, 255, 0], ["Visitor TT2 BRK", 22, false, false], [255, 255, 255, 0]],
]
item.description.split(/[\r\n]+/).each_with_index { |line, i|
result.push(["#{line}",
[12, i * 24 + 32], [520, 0], [255, 255, 255], ["Visitor TT2 BRK", 16, false, false], [255, 255, 255, 0]],
)
}
return result
else
return []
end
end
end
end |