Project1
标题:
脚本不显示中文?
[打印本页]
作者:
xiaoma1013
时间:
2008-2-25 07:17
标题:
脚本不显示中文?
这个脚本只能显示英文不能显示中文,请高手帮帮忙改一下
http://rpg.blue/upload_program/files/文本文档_84323963.txt
#=========================================================
# This is the ffx-2 Custom Menu System by Catchm.
# It is a long script and includes many alterations and images attached to it.
# These images can be edited, and the script can be edited, you are free to do so
# credit to Catchm is the only thing needed.
# this is to be copied into a new script in the script editor
#
# Have fun with the script!
#=========================================================
class Bitmap
def draw_text_shadow_rect(rect, text, align = 0)
self.font.size -= 2
old_col = self.font.color.clone
# Dark shadow
self.font.color = Color.new(0,0,0, 255)
draw_text(Rect.new(rect.x+1, rect.y+1, rect.width,
rect.height), text, align)
# Small outline
self.font.color = Color.new(96,96,96,96)
draw_text(Rect.new(rect.x+1, rect.y, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x-1, rect.y, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x, rect.y-1, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x, rect.y+1, rect.width,
rect.height), text, align)
# Normal text
self.font.color = old_col
draw_text(rect, text, align)
self.font.size += 2
end
def draw_text_shadow(x, y, wid, hei, text, align = 0)
self.font.size -= 2
old_col = self.font.color.clone
# Dark shadow
self.font.color = Color.new(0,0,0, 255)
draw_text(x+1,y+1,wid,hei,text, align)
# Small outline
self.font.color = Color.new(96,96,96,96)
draw_text(x+1,y,wid,hei,text, align)
draw_text(x+2,y,wid,hei,text, align)
draw_text(x+2,y,wid,hei,text, align)
draw_text(x,y-1,wid,hei,text, align)
draw_text(x,y+1,wid,hei,text, align)
draw_text(x,y+2,wid,hei,text, align)
# Normal
self.font.color = old_col
draw_text(x,y,wid,hei,text, align)
self.font.size += 2
end
def draw_text_outline(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline2(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 200)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline3(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(192, 224, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline4(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 190)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
end
class Window_Base < Window
#=====================================
# Gradient Bars , thanks to Acedent Prone
def draw_normal_barz(x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
def draw_actor_barz(actor,x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
#=====================================
# New definitions
def draw_battlegraphic(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
#======================================
def draw_actor_statuswindow(actor, x, y)
bitmap = RPG::Cache.picture(actor.character_name, actor.character_hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
#=====================================
def draw_actor_face(actor, x, y)
face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
fw = face.width
fh = face.height
src_rect = Rect.new(0, 0, fw, fh)
self.contents.blt(x - fw / 23, y - fh, face, src_rect)
end#=====================================
def draw_actor_name2(actor, x, y)
self.contents.font.name = $fontface
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, 120, 32, actor.name)
self.contents.draw_text(x + 1, y - 1, 120, 32, actor.name)
self.contents.draw_text(x + 1, y + 1, 120, 32, actor.name)
self.contents.draw_text(x - 1, y + 1, 120, 32, actor.name)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
#=====================================
def draw_actor_level2(actor, x, y)
self.contents.font.name = $fontface
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, 32, 32, "Lv")
self.contents.draw_text(x - 1, y + 1, 32, 32, "Lv")
self.contents.draw_text(x + 1, y - 1, 32, 32, "Lv")
self.contents.draw_text(x + 1, y + 1, 32, 32, "Lv")
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = outline_color
self.contents.draw_text(x + 31, y + 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 31, y - 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 33, y + 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 33, y - 1, 24, 32, actor.level.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
#=====================================
def draw_actor_class2(actor, x, y)
self.contents.font.name = "Black Chancery"
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 236, 32, actor.class_name)
self.contents.draw_text(x + 1, y - 1, 236, 32, actor.class_name)
self.contents.draw_text(x - 1, y + 1, 236, 32, actor.class_name)
self.contents.draw_text(x - 1, y - 1, 236, 32, actor.class_name)
self.contents.font.color = Color.new(238, 139, 254, 255)
self.contents.draw_text(x, y, 236, 32, actor.class_name)
end
#======================================
def draw_actor_hp2(actor, x, y, width = 144)
self.contents.font.name = "Tahoma"
# 文字列 "HP" を描画
self.contents.font.size = 24
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x + 1, y - 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x - 1, y - 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x - 1, y + 1, 32, 32, $data_system.words.hp)
self.contents.font.color = Color.new(254, 238, 189, 255)
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# MaxHP を描画するスペースがあるか計算
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
# HP を描画
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.contents.font.color = outline_color
self.contents.draw_text(hp_x - 1, y - 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x - 1, y + 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x + 1, y + 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x + 1, y - 1, 48, 32, actor.hp.to_s, 2)
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
# MaxHP を描画
if flag
self.contents.font.color = outline_color
self.contents.draw_text(hp_x + 60 - 1, y - 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 - 1, y + 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 + 1, y - 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 + 1, y + 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 - 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 + 1, y - 1, 12, 32, "/", 1)
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
end
end
#============================================
def draw_actor_sp2(actor, x, y, width = 144)
self.contents.font.name = "Tahoma"
# 文字列 "SP" を描画
self.contents.font.size = 24
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x + 1, y - 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x - 1, y - 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x - 1, y + 1, 32, 32, $data_system.words.sp)
self.contents.font.color = Color.new(74, 230, 51, 225)
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# MaxSP を描画するスペースがあるか計算
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end
# SP を描画
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.contents.font.color = outline_color
self.contents.draw_text(sp_x - 1, y - 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x - 1, y + 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x + 1, y - 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x + 1, y + 1, 48, 32, actor.sp.to_s, 2)
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
# MaxSP を描画
if flag
self.contents.font.color = outline_color
self.contents.draw_text(sp_x + 60 - 1, y - 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 - 1, y + 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 + 1, y + 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 + 1, y - 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.font.color = normal_color
self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
end
end
#=========================================
def draw_actor_state2(actor, x, y, width = 120)
self.contents.font.name = $fontface
text = make_battler_state_text(actor, width, true)
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, width, 32, text)
self.contents.draw_text(x - 1, y + 1, width, 32, text)
self.contents.draw_text(x + 1, y + 1, width, 32, text)
self.contents.draw_text(x + 1, y - 1, width, 32, text)
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
self.contents.draw_text(x, y, width, 32, text)
end
#=====================================
def draw_actor_parameter2(actor, x, y, type)
case type
when 0
parameter_name = $data_system.words.atk
parameter_value = actor.atk
when 1
parameter_name = $data_system.words.pdef
parameter_value = actor.pdef
when 2
parameter_name = "Magic Def"
parameter_value = actor.mdef
when 3
parameter_name = $data_system.words.str
parameter_value = actor.str
when 4
parameter_name = $data_system.words.dex
parameter_value = actor.dex
when 5
parameter_name = $data_system.words.agi
parameter_value = actor.agi
when 6
parameter_name = $data_system.words.int
parameter_value = actor.int
end
self.contents.font.color = system_color
self.contents.draw_text_outline(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text_outline(x + 130, y, 36, 32, parameter_value.to_s, 2)
end
#=========================================
def draw_item_name2(item, x, y)
if item == nil
self.contents.draw_text_outline(x + 28, y, 212, 32, "EMPTY")
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text_outline(x + 28, y, 212, 32, item.name)
end
# New colour for outlining text - Black
def outline_color
return Color.new(0, 0, 0, 255)
end
end
#==============================================================================
# ■ Window_Selectable
#------------------------------------------------------------------------------
# カーソルの移動やスクロールの機能を持つウィンドウクラスです。
#==============================================================================
class Window_Itemselectable < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :index # カーソル位置
attr_reader :help_window # ヘルプウィンドウ
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
# width : ウィンドウの幅
# height : ウィンドウの高さ
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = -1
end
#--------------------------------------------------------------------------
# ● カーソル位置の設定
# index : 新しいカーソル位置
#--------------------------------------------------------------------------
def index=(index)
@index = index
# ヘルプテキストを更新 (update_help は継承先で定義される)
if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
#--------------------------------------------------------------------------
# ● 行数の取得
#--------------------------------------------------------------------------
def row_max
# 項目数と列数から行数を算出
return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# ● 先頭の行の取得
#--------------------------------------------------------------------------
def top_row
# ウィンドウ内容の転送元 Y 座標を、1 行の高さ 32 で割る
return self.oy / 32
end
#--------------------------------------------------------------------------
# ● 先頭の行の設定
# row : 先頭に表示する行
#--------------------------------------------------------------------------
def top_row=(row)
# row が 0 未満の場合は 0 に修正
if row < 0
row = 0
end
# row が row_max - 1 超の場合は row_max - 1 に修正
if row > row_max - 1
row = row_max - 1
end
# row に 1 行の高さ 32 を掛け、ウィンドウ内容の転送元 Y 座標とする
self.oy = row * 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる行数の取得
#--------------------------------------------------------------------------
def page_row_max
# ウィンドウの高さから、フレームの高さ 32 を引き、1 行の高さ 32 で割る
return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる項目数の取得
#--------------------------------------------------------------------------
def page_item_max
# 行数 page_row_max に 列数 @column_max を掛ける
return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの設定
# help_window : 新しいヘルプウィンドウ
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
# ヘルプテキストを更新 (update_help は継承先で定義される)
if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
# カーソル位置が 0 未満の場合
if @index < 0
self.cursor_rect.empty
return
end
# 現在の行を取得
row = @index / @column_max
# 現在の行が、表示されている先頭の行より前の場合
if row < self.top_row
# 現在の行が先頭になるようにスクロール
self.top_row = row
end
# 現在の行が、表示されている最後尾の行より後ろの場合
if row > self.top_row + (self.page_row_max - 1)
# 現在の行が最後尾になるようにスクロール
self.top_row = row - (self.page_row_max - 1)
end
# カーソルの幅を計算
cursor_width = self.width / @column_max - 32
# カーソルの座標を計算
x = @index % @column_max * (cursor_width + 6) + 10
y = @index / @column_max * 32 - self.oy
# カーソルの矩形を更新
self.cursor_rect.set(x, y, cursor_width, 32)
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
# カーソルの移動が可能な状態の場合
if self.active and @item_max > 0 and @index >= 0
# 方向ボタンの下が押された場合
if Input.repeat?(Input::DOWN)
# 列数が 1 かつ 方向ボタンの下の押下状態がリピートでない場合か、
# またはカーソル位置が(項目数 - 列数)より前の場合
if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
@index < @item_max - @column_max
# カーソルを下に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
# 方向ボタンの上が押された場合
if Input.repeat?(Input::UP)
# 列数が 1 かつ 方向ボタンの上の押下状態がリピートでない場合か、
# またはカーソル位置が列数より後ろの場合
if (@column_max == 1 and Input.trigger?(Input::UP)) or
@index >= @column_max
# カーソルを上に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
# 方向ボタンの右が押された場合
if Input.repeat?(Input::RIGHT)
# 列数が 2 以上で、カーソル位置が(項目数 - 1)より前の場合
if @column_max >= 2 and @index < @item_max - 1
# カーソルを右に移動
$game_system.se_play($data_system.cursor_se)
@index += 1
end
end
# 方向ボタンの左が押された場合
if Input.repeat?(Input::LEFT)
# 列数が 2 以上で、カーソル位置が 0 より後ろの場合
if @column_max >= 2 and @index > 0
# カーソルを左に移動
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
end
# R ボタンが押された場合
if Input.repeat?(Input::R)
# 表示されている最後尾の行が、データ上の最後の行よりも前の場合
if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
# カーソルを 1 ページ後ろに移動
$game_system.se_play($data_system.cursor_se)
@index = [@index + self.page_item_max, @item_max - 1].min
self.top_row += self.page_row_max
end
end
# L ボタンが押された場合
if Input.repeat?(Input::L)
# 表示されている先頭の行が 0 より後ろの場合
if self.top_row > 0
# カーソルを 1 ページ前に移動
$game_system.se_play($data_system.cursor_se)
@index = [@index - self.page_item_max, 0].max
self.top_row -= self.page_row_max
end
end
end
# ヘルプテキストを更新 (update_help は継承先で定義される)
if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
end
#==============================================================================
# ■ Window_Menuselectable
#------------------------------------------------------------------------------
# カーソルの移動やスクロールの機能を持つウィンドウクラスです。
#==============================================================================
class Window_Menuselectable < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :index # カーソル位置
attr_reader :help_window # ヘルプウィンドウ
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
# width : ウィンドウの幅
# height : ウィンドウの高さ
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = -1
end
#--------------------------------------------------------------------------
# ● カーソル位置の設定
# index : 新しいカーソル位置
#--------------------------------------------------------------------------
def index=(index)
@index = index
# ヘルプテキストを更新 (update_help は継承先で定義される)
if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
#--------------------------------------------------------------------------
# ● 行数の取得
#--------------------------------------------------------------------------
def row_max
# 項目数と列数から行数を算出
return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# ● 先頭の行の取得
#--------------------------------------------------------------------------
def top_row
# ウィンドウ内容の転送元 Y 座標を、1 行の高さ 32 で割る
return self.oy / 32
end
#--------------------------------------------------------------------------
# ● 先頭の行の設定
# row : 先頭に表示する行
#--------------------------------------------------------------------------
def top_row=(row)
# row が 0 未満の場合は 0 に修正
if row < 0
row = 0
end
# row が row_max - 1 超の場合は row_max - 1 に修正
if row > row_max - 1
row = row_max - 1
end
# row に 1 行の高さ 32 を掛け、ウィンドウ内容の転送元 Y 座標とする
self.oy = row * 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる行数の取得
#--------------------------------------------------------------------------
def page_row_max
# ウィンドウの高さから、フレームの高さ 32 を引き、1 行の高さ 32 で割る
return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる項目数の取得
#--------------------------------------------------------------------------
def page_item_max
# 行数 page_row_max に 列数 @column_max を掛ける
return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの設定
# help_window : 新しいヘルプウィンドウ
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
# ヘルプテキストを更新 (update_help は継承先で定義される)
if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
复制代码
[LINE]1,#dddddd[/LINE]
此贴于 2008-2-27 1:13:35 被版主水迭澜提醒,请楼主看到后对本贴做出回应。
[LINE]1,#dddddd[/LINE]
----------------版务----------------
如果问题未解决,请继续提问
如果问题已解决,请结贴
若到末贴发贴时间后一周仍未结贴
管理员会自动为你过期帖子、结贴或强行认可答案(好人卡-1)
作者:
xiaoma1013
时间:
2008-2-25 07:24
def update_cursor_rect
# カーソル位置が 0 未満の場合
if @index < 0
self.cursor_rect.empty
return
end
# 現在の行を取得
row = @index / @column_max
# 現在の行が、表示されている先頭の行より前の場合
if row < self.top_row
# 現在の行が先頭になるようにスクロール
self.top_row = row
end
# 現在の行が、表示されている最後尾の行より後ろの場合
if row > self.top_row + (self.page_row_max - 1)
# 現在の行が最後尾になるようにスクロール
self.top_row = row - (self.page_row_max - 1)
end
# カーソルの幅を計算
cursor_width = self.width / @column_max - 32
# カーソルの座標を計算
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 40 - self.oy
# カーソルの矩形を更
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
# カーソルの移動が可能な状態の場合
if self.active and @item_max > 0 and @index >= 0
# 方向ボタンの下が押された場合
if Input.repeat?(Input::DOWN)
# 列数が 1 かつ 方向ボタンの下の押下状態がリピートでない場合か、
# またはカーソル位置が(項目数 - 列数)より前の場合
if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
@index < @item_max - @column_max
# カーソルを下に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
# 方向ボタンの上が押された場合
if Input.repeat?(Input::UP)
# 列数が 1 かつ 方向ボタンの上の押下状態がリピートでない場合か、
# またはカーソル位置が列数より後ろの場合
if (@column_max == 1 and Input.trigger?(Input::UP)) or
@index >= @column_max
# カーソルを上に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
# 方向ボタンの右が押された場合
if Input.repeat?(Input::RIGHT)
# 列数が 2 以上で、カーソル位置が(項目数 - 1)より前の場合
if @column_max >= 2 and @index < @item_max - 1
# カーソルを右に移動
$game_system.se_play($data_system.cursor_se)
@index += 1
end
end
# 方向ボタンの左が押された場合
if Input.repeat?(Input::LEFT)
# 列数が 2 以上で、カーソル位置が 0 より後ろの場合
if @column_max >= 2 and @index > 0
# カーソルを左に移動
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
end
# R ボタンが押された場合
if Input.repeat?(Input::R)
# 表示されている最後尾の行が、データ上の最後の行よりも前の場合
if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
# カーソルを 1 ページ後ろに移動
$game_system.se_play($data_system.cursor_se)
@index = [@index + self.page_item_max, @item_max - 1].min
self.top_row += self.page_row_max
end
end
# L ボタンが押された場合
if Input.repeat?(Input::L)
# 表示されている先頭の行が 0 より後ろの場合
if self.top_row > 0
# カーソルを 1 ページ前に移動
$game_system.se_play($data_system.cursor_se)
@index = [@index - self.page_item_max, 0].max
self.top_row -= self.page_row_max
end
end
end
# ヘルプテキストを更新 (update_help は継承先で定義される)
if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
end
#==============================================================================
# ■ Window_Menucommand
#------------------------------------------------------------------------------
# 一般的なコマンド選択を行うウィンドウです。
#==============================================================================
class Window_Menucommand < Window_Menuselectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# width : ウィンドウの幅
# commands : コマンド文字列の配列
#--------------------------------------------------------------------------
def initialize(width, commands)
# コマンドの個数からウィンドウの高さを算出
super(0, 0, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
# color : 文字色
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
end
#--------------------------------------------------------------------------
# ● 項目の無効化
# index : 項目番号
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
end
#==============================================================================
# ■ Window_Help
#------------------------------------------------------------------------------
# スキルやアイテムの説明、アクターのステータスなどを表示するウィンドウです。
#==============================================================================
class Window_Menuhelp < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, - 77, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 18
self.opacity = 0
end
#--------------------------------------------------------------------------
# ● テキスト設定
# text : ウィンドウに表示する文字列
# align : アラインメント (0..左揃え、1..中央揃え、2..右揃え)
#--------------------------------------------------------------------------
def set_text(text, align = 0)
# テキストとアラインメントの少なくとも一方が前回と違っている場合
if text != @text or align != @align
# テキストを再描画
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
#--------------------------------------------------------------------------
# ● アクター設定
# actor : ステータスを表示するアクター
#--------------------------------------------------------------------------
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
draw_actor_hp(actor, 284, 0)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
end
end
#--------------------------------------------------------------------------
# ● エネミー設定
# enemy : 名前とステートを表示するエネミー
#--------------------------------------------------------------------------
def set_enemy(enemy)
text = enemy.name
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
text += " " + state_text
end
set_text(text, 1)
end
end
#==============================================================================
# ■ Window_Gold
#------------------------------------------------------------------------------
# ゴールドを表示するウィンドウです。
#==========================================================================
class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
cx = contents.text_size("Gold").width
self.contents.font.color = outline_color
self.contents.draw_text(81, - 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(81, 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(79, 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(79, - 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(80, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = outline_color
self.contents.draw_text(- 1, - 1, cx, 32, "Gold", 2)
self.contents.draw_text(1, 1, cx, 32, "Gold", 2)
self.contents.draw_text(- 1, 1, cx, 32, "Gold", 2)
self.contents.draw_text(1, - 1, cx, 32, "Gold", 2)
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(0, 0, cx, 32, "Gold", 2)
end
end
#==============================================================================
# ■ Window_PlayTime
#------------------------------------------------------------------------------
# メニュー画面でプレイ時間を表示するウィンドウです。
#==============================================================================
class Window_PlayTime < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 70)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 21
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = outline_color
self.contents.draw_text(1, - 1, 120, 32, "Play Time")
self.contents.draw_text(1, 1, 120, 32, "Play Time")
self.contents.draw_text(-1, - 1, 120, 32, "Play Time")
self.contents.draw_text(-1, 1, 120, 32, "Play Time")
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(0, 0, 120, 32, "Play Time")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = outline_color
self.contents.draw_text(39, - 1, 120, 32, text, 2)
self.contents.draw_text(39, 1, 120, 32, text, 2)
self.contents.draw_text(41, 1, 120, 32, text, 2)
self.contents.draw_text(41, -1, 120, 32, text, 2)
self.contents.font.color = normal_color
self.contents.draw_text(40, 0, 120, 32, text, 2)
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# メニュー画面でパーティメンバーのステータスを表示するウィンドウです。
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 430)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 100 - i * 18
y = i * 100
actor = $game_party.actors
draw_actor_face(actor, x - 40, y + 80)
draw_actor_name2(actor, x + 50, y)
draw_actor_class2(actor, x + 50, y + 50)
draw_actor_level2(actor, x + 50, y + 25)
draw_actor_state2(actor, x + 155, y + 50)
draw_actor_hp2(actor, x + 140, y )
draw_actor_sp2(actor, x + 140, y + 25)
draw_actor_barz(actor, x + 140, y + 25, "horizontal", 130, 1, actor.hp, actor.maxhp, Color.new(254, 238, 189, 255), Color.new(182, 137, 2, 255))
draw_actor_barz(actor, x + 140, y + 50, "horizontal", 130, 1, actor.sp, actor.maxsp, Color.new(74, 230, 51, 225), Color.new(35, 150, 19, 225))
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
self.cursor_rect.empty
end
end
#==============================================================================
# ■ Window_Item
#------------------------------------------------------------------------------
# アイテム画面、バトル画面で、所持アイテムの一覧を表示するウィンドウです。
#==============================================================================
class Window_Menuitem < Window_Itemselectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 500, 640, 380)
@column_max = 2
refresh
self.index = 0
self.opacity = 0
# 戦闘中の場合はウィンドウを画面中央へ移動し、半透明にする
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# ● アイテムの取得
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# アイテムを追加
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items
)
end
end
# 戦闘中以外なら武器と防具も追加
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons
)
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors
)
end
end
end
# 項目数が 0 でなければビットマップを作成し、全項目を描画
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = Color.new(255, 255, 255, 200)
end
x = 4 + index % 2 * (270 + 25) + 12
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.draw_text_outline(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text_outline(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text_outline(x + 256, y, 24, 32, number.to_s, 2)
else
self.contents.draw_text_outline2(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text_outline2(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text_outline2(x + 256, y, 24, 32, number.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# ■ Window_Menuskill
#------------------------------------------------------------------------------
#
#==============================================================================
class Window_Menuskill < Window_Itemselectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(- 3, 531, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
# 戦闘中の場合はウィンドウを画面中央へ移動し、半透明にする
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# ● スキルの取得
#--------------------------------------------------------------------------
def skill
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in
[email protected]
skill = $data_skills[@actor.skills
]
if skill != nil
@data.push(skill)
end
end
# 項目数が 0 でなければビットマップを作成し、全項目を描画
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = Color.new(255, 255, 255, 200)
end
x = 4 + index % 2 * (270 + 25) + 12
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
if @actor.skill_can_use?(skill.id)
self.contents.draw_text_outline(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text_outline(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
else
self.contents.draw_text_outline2(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text_outline2(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
end
#==============================================================================
# ■ Window_SkillStatus
#------------------------------------------------------------------------------
# スキル画面で、スキル使用者のステータスを表示するウィンドウです。
#==============================================================================
class Window_SkillStatus < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(630, 35, 410, 109)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 0
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
x = 100
y = 0
draw_actor_face(@actor, x - 40, y + 80)
draw_actor_name2(@actor, x + 50, y)
draw_actor_class2(@actor, x + 50, y + 50)
draw_actor_level2(@actor, x + 50, y + 25)
draw_actor_state2(@actor, x + 155, y + 50)
draw_actor_hp2(@actor, x + 140, y )
draw_actor_sp2(@actor, x + 140, y + 25)
draw_actor_barz(@actor, x + 140, y + 25, "horizontal", 130, 1, @actor.hp, @actor.maxhp, Color.new(254, 238, 189, 255), Color.new(182, 137, 2, 255))
draw_actor_barz(@actor, x + 140, y + 50, "horizontal", 130, 1, @actor.sp, @actor.maxsp, Color.new(74, 230, 51, 225), Color.new(35, 150, 19, 225))
end
end
#==============================================================================
# ■ Window_Target
#------------------------------------------------------------------------------
# アイテム画面とスキル画面で、使用対象のアクターを選択するウィンドウです。
#==============================================================================
class Window_Target < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 336, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.z += 10
@item_max = $game_party.actors.size
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
x = 4
y = i * 116
actor = $game_party.actors
draw_actor_name2(actor, x, y)
draw_actor_class2(actor, x + 144, y)
draw_actor_level2(actor, x + 8, y + 32)
draw_actor_state2(actor, x + 8, y + 64)
draw_actor_hp2(actor, x + 152, y + 32)
draw_actor_sp2(actor, x + 152, y + 64)
draw_actor_barz(actor, x + 152, y + 57, "horizontal", 130, 1, actor.hp, actor.maxhp, Color.new(254, 238, 189, 255), Color.new(182, 137, 2, 255))
draw_actor_barz(actor, x + 152, y + 89, "horizontal", 130, 1, actor.sp, actor.maxsp, Color.new(74, 230, 51, 225), Color.new(35, 150, 19, 225))
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
# カーソル位置 -1 は全選択、-2 以下は単独選択 (使用者自身)
if @index <= -2
self.cursor_rect.set(0, (@index + 10) * 116, self.width - 32, 96)
elsif @index == -1
self.cursor_rect.set(0, 0, self.width - 32, @item_max * 116 - 20)
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
#==============================================================================
# ■ Window_EquipRight
#------------------------------------------------------------------------------
# 装備画面で、アクターが現在装備しているアイテムを表示するウィンドウです。
#==============================================================================
class Window_EquipRight < Window_Menuselectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(- 100, 125, 200, 350)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 0
@actor = actor
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# ● アイテムの取得
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
draw_item_name2(@data[0], 0, 68 * 0)
draw_item_name2(@data[1], 0, 68 * 1)
draw_item_name2(@data[2], 0, 68 * 2)
draw_item_name2(@data[3], 0, 68 * 3)
draw_item_name2(@data[4], 0, 68 * 4 - 2)
end
#--------------------------------------------------------------------------
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# ■ Window_EquipItem
#------------------------------------------------------------------------------
# 装備画面で、装備変更の候補となるアイテムの一覧を表示するウィンドウです。
#==============================================================================
class Window_EquipItem < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
# equip_type : 装備部位 (0~3)
#--------------------------------------------------------------------------
def initialize(actor, equip_type)
super(233, 573, 413, 224)
@actor = actor
@equip_type = equip_type
@column_max = 2
refresh
self.active = false
self.index = -1
self.opacity = 0
end
#--------------------------------------------------------------------------
# ● アイテムの取得
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# 装備可能な武器を追加
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons
)
end
end
end
# 装備可能な防具を追加
if @equip_type != 0
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors
.kind == @equip_type-1
@data.push($data_armors
)
end
end
end
end
# 空白を追加
@data.push(nil)
# ビットマップを作成し、全項目を描画
@item_max = @data.size
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = 22
for i in 0...@item_max-1
draw_item(i)
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
x = 4 + index % 2 * (176 + 16)
y = index / 2 * 32
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
self.contents.draw_text_shadow(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text_shadow(x + 140, y, 16, 32, ":", 1)
self.contents.draw_text_shadow(x + 156, y, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
def update_cursor_rect
# カーソル位置が 0 未満の場合
if @index < 0
self.cursor_rect.empty
return
end
# 現在の行を取得
row = @index / @column_max
# 現在の行が、表示されている先頭の行より前の場合
if row < self.top_row
# 現在の行が先頭になるようにスクロール
self.top_row = row
end
# 現在の行が、表示されている最後尾の行より後ろの場合
if row > self.top_row + (self.page_row_max - 1)
# 現在の行が最後尾になるようにスクロール
self.top_row = row - (self.page_row_max - 1)
end
# カーソルの幅を計算
cursor_width = self.width / @column_max - 32
# カーソルの座標を計算
x = @index % @column_max * (cursor_width + 16)
y = @index / @column_max * 32 - self.oy
# カーソルの矩形を更新
self.cursor_rect.set(x + 2, y, cursor_width + 15, 32)
end
作者:
xiaoma1013
时间:
2008-2-25 07:26
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# ■ Window_Status
#------------------------------------------------------------------------------
# ステータス画面で表示する、フル仕様のステータスウィンドウです。
#==============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 418, 133)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_face(@actor, 0, 90)
draw_actor_name2(@actor, 90, 0)
draw_actor_class2(@actor, 250, 0)
draw_actor_level2(@actor, 90, 32)
draw_actor_state2(@actor, 90, 64)
draw_actor_hp2(@actor, 210, 32, 172)
draw_actor_sp2(@actor, 210, 64, 172)
draw_actor_barz(@actor, 210, 57, "horizontal", 158, 1, @actor.hp, @actor.maxhp, Color.new(254, 238, 189, 255), Color.new(182, 137, 2, 255))
draw_actor_barz(@actor, 210, 89, "horizontal", 158, 1, @actor.sp, @actor.maxsp, Color.new(74, 230, 51, 225), Color.new(35, 150, 19, 225))
end
end
#==============================================================================
# ■ Window_Status2
#------------------------------------------------------------------------------
# ステータス画面で表示する、フル仕様のステータスウィンドウです。
#==============================================================================
class Window_Status2 < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 418, 178)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 24
draw_actor_parameter2(@actor, 0, 10, 0)
draw_actor_parameter2(@actor, 0, 40, 1)
draw_actor_parameter2(@actor, 0, 70, 2)
draw_actor_parameter2(@actor, 0, 100, 3)
draw_actor_parameter2(@actor, 190, 20, 4)
draw_actor_parameter2(@actor, 190, 50, 5)
draw_actor_parameter2(@actor, 190, 80, 6)
draw_actor_barz(@actor, 0, 37, "horizontal", 168, 1, @actor.atk, 500, Color.new(242, 2, 6, 255), Color.new(253, 53, 56, 255))
draw_actor_barz(@actor, 0, 67, "horizontal", 168, 1, @actor.pdef, 500, Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255))
draw_actor_barz(@actor, 0, 97, "horizontal", 168, 1, @actor.mdef, 500, Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255))
draw_actor_barz(@actor, 0, 127, "horizontal", 168, 1, @actor.str, 500, Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255))
draw_actor_barz(@actor, 190, 47, "horizontal", 168, 1, @actor.dex, 500, Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255))
draw_actor_barz(@actor, 190, 77, "horizontal", 168, 1, @actor.agi, 500, Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255))
draw_actor_barz(@actor, 190, 107, "horizontal", 168, 1, @actor.int, 500, Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255))
if @new_atk != nil
draw_actor_barz(@actor, 0, 37, "horizontal", 168, 1, @new_atk, 500, Color.new(255, 0, 0, 255), Color.new(255, 0, 0, 255))
end
if @new_pdef != nil
draw_actor_barz(@actor, 0, 67, "horizontal", 168, 1, @new_pdef, 500, Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255))
end
if @new_mdef != nil
draw_actor_barz(@actor, 0, 97, "horizontal", 168, 1, @new_mdef, 500, Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255))
end
if @new_str != nil
draw_actor_barz(@actor, 0, 127, "horizontal", 168, 1, @new_str, 500, Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255))
end
if @new_dex != nil
draw_actor_barz(@actor, 190, 47, "horizontal", 168, 1, @new_dex, 500, Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255))
end
if @new_agi != nil
draw_actor_barz(@actor, 190, 77, "horizontal", 168, 1, @new_agi, 500, Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255))
end
if @new_int != nil
draw_actor_barz(@actor, 190, 107, "horizontal", 168, 1, @new_int, 500, Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255))
end
end
def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or
@new_agi != new_agi or @new_int != new_int
@new_atk = new_atk
@new_pdef = new_pdef
@new_mdef = new_mdef
@new_str = new_str
@new_dex = new_dex
@new_agi = new_agi
@new_int = new_int
refresh
end
end
end
#==============================================================================
# ■ Window_Status3
#------------------------------------------------------------------------------
# ステータス画面で表示する、フル仕様のステータスウィンドウです。
#==============================================================================
class Window_Status3 < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 418, 229)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 24
self.contents.font.color = system_color
self.contents.draw_text_outline3(150, 0, 96, 32, "Equipment")
draw_item_name2($data_weapons[@actor.weapon_id], 15 + 16, 48)
draw_item_name2($data_armors[@actor.armor1_id], 15 + 16, 86)
draw_item_name2($data_armors[@actor.armor2_id], 15 + 16, 124)
draw_item_name2($data_armors[@actor.armor3_id], 15 + 186, 68)
draw_item_name2($data_armors[@actor.armor4_id], 15 + 186, 106)
end
end
#==============================================================================
# ■ Window_Status4
#------------------------------------------------------------------------------
# ステータス画面で表示する、フル仕様のステータスウィンドウです。
#==============================================================================
class Window_Status4 < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 252, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 26
self.contents.font.color = system_color
self.contents.draw_text_outline3(10, 0, 80, 32, "EXP")
self.contents.draw_text_outline3(10, 32, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text_outline(10 + 80, 0, 84, 32, @actor.exp_s, 2)
self.contents.draw_text_outline(10 + 80, 32, 84, 32, @actor.next_rest_exp_s, 2)
end
end
#==============================================================================
# ■ Window_Status5
#------------------------------------------------------------------------------
# ステータス画面で表示する、フル仕様のステータスウィンドウです。
#==============================================================================
class Window_Status5 < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 300, 380)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_battlegraphic(@actor, 100, 300)
end
end
#==============================================================================
# ■ Window_SaveFile
#------------------------------------------------------------------------------
# セーブ画面およびロード画面で表示する、セーブファイルのウィンドウです。
#==============================================================================
class Window_SaveFile < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :filename # ファイル名
attr_reader :selected # 選択状態
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# file_index : セーブファイルのインデックス (0~3)
# filename : ファイル名
#--------------------------------------------------------------------------
def initialize(file_index, filename)
super(0, 64 + file_index % 4 * 104, 640, 104)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 0
@file_index = file_index
@filename = "Save#{@file_index + 1}.rxdata"
@time_stamp = Time.at(0)
@file_exist = FileTest.exist?(@filename)
if @file_exist
file = File.open(@filename, "r")
@time_stamp = file.mtime
@characters = Marshal.load(file)
@frame_count = Marshal.load(file)
@game_system = Marshal.load(file)
@game_switches = Marshal.load(file)
@game_variables = Marshal.load(file)
@total_sec = @frame_count / Graphics.frame_rate
file.close
end
refresh
@selected = false
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# ファイル番号を描画
self.contents.font.color = normal_color
name = "File #{@file_index + 1}"
self.contents.draw_text_outline(4, 0, 600, 32, name)
@name_width = contents.text_size(name).width
# セーブファイルが存在する場合
if @file_exist
# キャラクターを描画
for i in
[email protected]
bitmap = RPG::Cache.character(@characters
[0], @characters
[1])
cw = bitmap.rect.width / 4
ch = bitmap.rect.height / 4
src_rect = Rect.new(0, 0, cw, ch)
x = 300 - @characters.size * 32 + i * 64 - cw / 2
self.contents.blt(x, 68 - ch, bitmap, src_rect)
end
# プレイ時間を描画
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text_outline(4, 8, 600, 32, time_string, 2)
# タイムスタンプを描画
self.contents.font.color = normal_color
time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
self.contents.draw_text_outline(4, 40, 600, 32, time_string, 2)
end
end
#--------------------------------------------------------------------------
# ● 選択状態の設定
# selected : 新しい選択状態 (true=選択 false=非選択)
#--------------------------------------------------------------------------
def selected=(selected)
@selected = selected
update_cursor_rect
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
if @selected
self.cursor_rect.set(0, 0, @name_width + 8, 32)
else
self.cursor_rect.empty
end
end
end
#==============================================================================
# ■ Window_Location
#------------------------------------------------------------------------------
# メニュー画面で歩数を表示するウィンドウです。
class Game_Map
def name
$map_infos[@map_id]
end
end
class Scene_Title
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
end
#==============================================================================
# ■ Window_Mapname
#------------------------------------------------------------------------------
# メニュー画面でプレイ時間を表示するウィンドウです。
#==============================================================================
class Window_Mapname < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 240, 96)
self.contents = Bitmap.new(width - 52, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Map Name
#map = $game_map.name
self.contents.font.color = system_color
self.contents.font.size = 14
self.contents.draw_text(4, 0, 220, 32, "Location")
self.contents.font.size = $fontsize
self.contents.font.color = normal_color
self.contents.draw_text(110, 15, 80, 32, $game_map.name)
end
end
#==================================================
class Window_End < Window_Base
def initialize
super(0, 0, 240, 150)
self.contents = Bitmap.new(width - 52, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 30
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.draw_text_outline(24, 0, 240, 32, "To Title")
self.contents.draw_text_outline(10, 45, 240, 32, "Shutdown")
self.contents.draw_text_outline(25, 85, 240, 32, "Cancel")
end
#==========================================
end
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
# メニュー画面の処理を行うクラスです。
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# menu_index : コマンドのカーソル初期位置
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
#========================================
# This is setting up the background picture
@background = Sprite.new
@background.bitmap = RPG::Cache.picture("background")
@background.x = 0
@background.y = 0
#========================================
# This is setting up the command pictures for 'item' etc..
@command1 = Sprite.new
@command1.bitmap = RPG::Cache.picture("cmscommand1")
@command1.x = 15
@command1.y = 40
@command1.z = 100
#========================================
@command2 = Sprite.new
@command2.bitmap = RPG::Cache.picture("cmscommand2")
@command2.x = 15
@command2.y = 40
@command2.z = 100
#========================================
@command3 = Sprite.new
@command3.bitmap = RPG::Cache.picture("cmscommand3")
@command3.x = 15
@command3.y = 40
@command3.z = 100
#========================================
@command4 = Sprite.new
@command4.bitmap = RPG::Cache.picture("cmscommand4")
@command4.x = 15
@command4.y = 40
@command4.z = 100
#========================================
@command5 = Sprite.new
@command5.bitmap = RPG::Cache.picture("cmscommand5")
@command5.x = 15
@command5.y = 40
@command5.z = 100
#========================================
@command6 = Sprite.new
@command6.bitmap = RPG::Cache.picture("cmscommand6")
@command6.x = 15
@command6.y = 40
@command6.z = 100
#========================================
# This setting up the shadows for the commands.
@commands1 = Sprite.new
@commands1.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands1.x = 20
@commands1.y = 45
@commands1.z = 1
@commands1.opacity = 155
@commands1.visible = false
#========================================
@commands2 = Sprite.new
@commands2.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands2.x = 20
@commands2.y = 45
@commands2.z = 1
@commands2.opacity = 155
@commands2.visible = false
#========================================
@commands3 = Sprite.new
@commands3.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands3.x = 20
@commands3.y = 45
@commands3.z = 1
@commands3.opacity = 155
@commands3.visible = false
#========================================
@commands4 = Sprite.new
@commands4.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands4.x = 20
@commands4.y = 45
@commands4.z = 1
@commands4.opacity = 155
@commands4.visible = false
#========================================
@commands5 = Sprite.new
@commands5.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands5.x = 20
@commands5.y = 45
@commands5.z = 1
@commands5.opacity = 155
@commands5.visible = false
#========================================
@commands6 = Sprite.new
@commands6.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands6.x = 20
@commands6.y = 45
@commands6.z = 1
@commands6.opacity = 155
@commands6.visible = false
#========================================
# This is setting up the arrow cursor used in the command window..
@arrow = Sprite.new
@arrow.bitmap = RPG::Cache.picture("arrow4")
@arrow.x = 0
@arrow.y = 45
@arrow.z = 1000
#========================================
# This is setting up the arrow for the status window
@arrow_status = Sprite.new
@arrow_status.bitmap = RPG::Cache.picture("arrow4")
@arrow_status.x = 260
@arrow_status.y = 37
@arrow_status.z = 1000
@arrow_status.visible = false
#========================================
# This is setting up the status windows, making them not visible for the moment..
@status_window1 = Sprite.new
@status_window1.bitmap = RPG::Cache.picture("status window 1")
@status_window1.x = 693
@status_window1.y = 7
@status_window1.z = 100
@status_window1.visible = false
#========================================
@status_window2 = Sprite.new
@status_window2.bitmap = RPG::Cache.picture("status window 2")
@status_window2.x = 676
@status_window2.y = 106
@status_window2.z = 100
@status_window2.visible = false
#========================================
@status_window3 = Sprite.new
@status_window3.bitmap = RPG::Cache.picture("status window 3")
@status_window3.x = 659
@status_window3.y = 206
@status_window3.z = 100
@status_window3.visible = false
#========================================
@status_window4 = Sprite.new
@status_window4.bitmap = RPG::Cache.picture("status window 4")
@status_window4.x = 640
@status_window4.y = 306
@status_window4.z = 100
@status_window4.visible = false
#========================================
# The shadows are set up for the status windows..
@status_windowshadow1 = Sprite.new
@status_windowshadow1.bitmap = RPG::Cache.picture("blackwindow2")
@status_windowshadow1.x = 697
@status_windowshadow1.y = 13
@status_windowshadow1.z = 1
@status_windowshadow1.opacity = 155
@status_windowshadow1.visible = false
#========================================
@status_windowshadow2 = Sprite.new
@status_windowshadow2.bitmap = RPG::Cache.picture("blackwindow2")
@status_windowshadow2.x = 681
@status_windowshadow2.y = 112
@status_windowshadow2.z = 1
@status_windowshadow2.opacity = 155
@status_windowshadow2.visible = false
#========================================
@status_windowshadow3 = Sprite.new
@status_windowshadow3.bitmap = RPG::Cache.picture("blackwindow2")
@status_windowshadow3.x = 664
@status_windowshadow3.y = 212
@status_windowshadow3.z = 1
@status_windowshadow3.opacity = 155
@status_windowshadow3.visible = false
#========================================
@status_windowshadow4 = Sprite.new
@status_windowshadow4.bitmap = RPG::Cache.picture("blackwindow2")
@status_windowshadow4.x = 645
@status_windowshadow4.y = 312
@status_windowshadow4.z = 1
@status_windowshadow4.opacity = 155
@status_windowshadow4.visible = false
#========================================
# Here, certain status window pictures are made visible depending on
# how many actors or players there are..
if $game_party.actors.size == 1
@status_window1.visible = true
@status_windowshadow1.visible = true
end
if $game_party.actors.size == 2
@status_window1.visible = true
@status_windowshadow1.visible = true
@status_window2.visible = true
@status_windowshadow2.visible = true
end
if $game_party.actors.size == 3
@status_window1.visible = true
@status_windowshadow1.visible = true
@status_window2.visible = true
@status_windowshadow2.visible = true
@status_window3.visible = true
@status_windowshadow3.visible = true
end
if $game_party.actors.size == 4
@status_window1.visible = true
@status_windowshadow1.visible = true
@status_window2.visible = true
@status_windowshadow2.visible = true
@status_window3.visible = true
@status_windowshadow3.visible = true
@status_window4.visible = true
@status_windowshadow4.visible = true
end
作者:
xiaoma1013
时间:
2008-2-25 07:31
#===========================================
# The window displaying the gold, and playtime is set up...
@playtimegoldpicture = Sprite.new
@playtimegoldpicture.bitmap = RPG::Cache.picture("goldplaytimewindow")
@playtimegoldpicture.x = 646
@playtimegoldpicture.y = 404
@playtimegoldpicture.z = 100
#============================================
# And its shadow
@playtimegoldshadow = Sprite.new
@playtimegoldshadow.bitmap = RPG::Cache.picture("goldplaytimeshadow")
@playtimegoldshadow.x = 651
@playtimegoldshadow.y = 409
@playtimegoldshadow.z = 1
@playtimegoldshadow.opacity = 155
#============================================
# Setting up the location window's bar....
@location_bar = Sprite.new
@location_bar.bitmap = RPG::Cache.picture("locationbar")
@location_bar.x = 15
@location_bar.y = 635
#============================================
# Setting up the actual window for the map, opacity - 0
@location_window = Window_Mapname.new
@location_window.x = 0
@location_window.y = 609
#============================================
# Setting up a white bar below the location
@location_white = Sprite.new
@location_white.bitmap = RPG::Cache.picture("locationwhite")
@location_white.x = - 8
@location_white.y = 622
@location_white.z = 120
#============================================
@playtime_window = Window_PlayTime.new
@playtime_window.x = 645
@playtime_window.y = 390
# コマンドウィンドウを作成
# Command window, opacity - 0 so it is invisible, and commands are set to ""
# - nothing so no text shows, as there is pictures used instead..
s1 = ""
s2 = ""
s3 = ""
s4 = ""
s5 = ""
s6 = ""
@command_window = Window_Menucommand.new(200, [s1, s2, s3, s4, s5, s6])
@command_window.opacity = 0
@command_window.index = @menu_index
# パーティ人数が 0 人の場合
if $game_party.actors.size == 0
# アイテム、スキル、装備、ステータスを無効化
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
# セーブ禁止の場合
if $game_system.save_disabled
# セーブを無効にする
@command_window.disable_item(4)
end
# ゴールドウィンドウを作成
@gold_window = Window_Gold.new
@gold_window.x = 645
@gold_window.y = 415
@gold_window.opacity = 0
# ステータスウィンドウを作成
@status_window = Window_MenuStatus.new
@status_window.x = 630
@status_window.y = - 6
@status_window.opacity = 0
@status_window.visible = true
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報を更新
Input.update
# フレーム更新
update
# 画面が切り替わったらループを中断
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@background.dispose
@command1.dispose
@command2.dispose
@command3.dispose
@command4.dispose
@command5.dispose
@command6.dispose
@commands1.dispose
@commands2.dispose
@commands3.dispose
@commands4.dispose
@commands5.dispose
@commands6.dispose
@arrow.dispose
@status_window1.dispose
@status_window2.dispose
@status_window3.dispose
@status_window4.dispose
@status_windowshadow1.dispose
@status_windowshadow2.dispose
@status_windowshadow3.dispose
@status_windowshadow4.dispose
@playtimegoldpicture.dispose
@playtimegoldshadow.dispose
@location_bar.dispose
@location_window.dispose
@location_white.dispose
@playtime_window.dispose
@arrow_status.dispose
end
#--------------------------------------------------------------------------
def delay(seconds)
for i in 0...(seconds * 1)
sleep 0.01
Graphics.update
end
end
# ● フレーム更新
#--------------------------------------------------------------------------
def update
if @command2.y < 100
@command2.y += 20
end
if @command3.y < 160
@command3.y += 20
end
if @command4.y < 220
@command4.y += 20
end
if @command5.y < 280
@command5.y += 20
end
if @command6.y < 340
@command6.y += 20
end
if @command6.y >= 340
@commands1.visible = true
@commands2.visible = true
@commands3.visible = true
@commands4.visible = true
@commands5.visible = true
@commands6.visible = true
end
if @status_window1.x > 293
@status_window1.x -= 50
end
if @status_window2.x > 276
@status_window2.x -= 50
end
if @status_window3.x > 259
@status_window3.x -= 50
end
if @status_window4.x > 240
@status_window4.x -= 50
end
if @status_windowshadow1.x > 297
@status_windowshadow1.x -= 50
end
if @status_windowshadow2.x > 281
@status_windowshadow2.x -= 50
end
if @status_windowshadow3.x > 264
@status_windowshadow3.x -= 50
end
if @status_windowshadow4.x > 245
@status_windowshadow4.x -= 50
end
if @status_window.x > 230
@status_window.x -= 50
end
if @playtimegoldpicture.x > 446
@playtimegoldpicture.x -= 25
end
if @playtimegoldshadow.x > 451
@playtimegoldshadow.x -= 25
end
if @playtime_window.x > 445
@playtime_window.x -= 25
end
if @gold_window.x > 445
@gold_window.x -= 25
end
if @location_bar.y > 435
@location_bar.y -= 25
end
if @location_window.y > 409
@location_window.y -= 25
end
if @location_white.y > 422
@location_white.y -= 25
end
# ウィンドウを更新
@command_window.update
@playtime_window.update
@gold_window.update
@status_window.update
@arrow.update
@playtime_window.update
# コマンドウィンドウがアクティブの場合: update_command を呼ぶ
if @command_window.active
update_command
return
end
# ステータスウィンドウがアクティブの場合: update_status を呼ぶ
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (コマンドウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_command
case @command_window.index
when 0
@arrow.y = 45
@commands1.y = 45
@commands2.y = 105
@commands3.y = 165
@commands4.y = 225
@commands5.y = 285
@commands6.y = 345
@status_windowshadow1.y = 13
@status_windowshadow2.y = 112
@status_windowshadow3.y = 212
@status_windowshadow4.y = 312
@playtimegoldshadow.y = 409
when 1
@arrow.y = 105
@commands1.y = 42
@commands2.y = 100
@commands3.y = 162
@commands4.y = 222
@commands5.y = 282
@commands6.y = 342
@status_windowshadow1.y = 11
@status_windowshadow2.y = 110
@status_windowshadow3.y = 210
@status_windowshadow4.y = 310
@playtimegoldshadow.y = 406
when 2
@arrow.y = 165
@commands1.y = 39
@commands2.y = 97
@commands3.y = 159
@commands4.y = 219
@commands5.y = 279
@commands6.y = 339
@status_windowshadow1.y = 8
@status_windowshadow2.y = 107
@status_windowshadow3.y = 207
@status_windowshadow4.y = 307
@playtimegoldshadow.y = 403
when 3
@arrow.y = 225
@commands1.y = 36
@commands2.y = 94
@commands3.y = 156
@commands4.y = 216
@commands5.y = 276
@commands6.y = 336
@status_windowshadow1.y = 5
@status_windowshadow2.y = 104
@status_windowshadow3.y = 204
@status_windowshadow4.y = 304
@playtimegoldshadow.y = 400
when 4
@arrow.y = 285
@commands1.y = 33
@commands2.y = 91
@commands3.y = 153
@commands4.y = 213
@commands5.y = 273
@commands6.y = 333
@status_windowshadow1.y = 2
@status_windowshadow2.y = 101
@status_windowshadow3.y = 201
@status_windowshadow4.y = 301
@playtimegoldshadow.y = 397
when 5
@arrow.y = 345
@commands1.y = 30
@commands2.y = 88
@commands3.y = 150
@commands4.y = 210
@commands5.y = 270
@commands6.y = 330
@status_windowshadow1.y = - 1
@status_windowshadow2.y = 99
@status_windowshadow3.y = 199
@status_windowshadow4.y = 299
@playtimegoldshadow.y = 394
end
#======================
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
@arrow.visible = false
loop do
if @command1.x > - 200
@command1.x -= 40
end
if @command2.x > - 200
@command2.x -= 40
end
if @command3.x > - 200
@command3.x -= 40
end
if @command4.x > - 200
@command4.x -= 40
end
if @command5.x > - 200
@command5.x -= 40
end
if @command6.x > - 200
@command6.x -= 40
end
@commands1.visible = false
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @status_window.x < 640
@status_window.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 25
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 25
end
if @playtime_window.x < 640
@playtime_window.x += 25
end
if @gold_window.x < 640
@gold_window.x += 25
end
if @location_bar.y < 480
@location_bar.y += 25
end
if @location_window.y < 480
@location_window.y += 25
end
if @location_white.y < 480
@location_white.y += 25
end
delay(0.1)
if @status_window.x >= 640
break
end
end
$game_system.se_play($data_system.cancel_se)
# マップ画面に切り替え
$scene = Scene_Map.new
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
# パーティ人数が 0 人で、セーブ、ゲーム終了以外のコマンドの場合
if $game_party.actors.size == 0 and @command_window.index < 4
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# コマンドウィンドウのカーソル位置で分岐
case @command_window.index
when 0 # アイテム
@command1.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# アイテム画面に切り替え
$scene = Scene_Item.new
when 1 # スキル
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# ステータスウィンドウをアクティブにする
@command_window.active = false
@status_window.active = true
@status_window.index = 0
@arrow_status.visible = true
when 2 # 装備
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# ステータスウィンドウをアクティブにする
@command_window.active = false
@status_window.active = true
@status_window.index = 0
@arrow_status.visible = true
when 3 # ステータス
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# ステータスウィンドウをアクティブにする
@command_window.active = false
@status_window.active = true
@status_window.index = 0
@arrow_status.visible = true
when 4 # セーブ
# セーブ禁止の場合
if $game_system.save_disabled
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
#=====================
@command5.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# セーブ画面に切り替え
$scene = Scene_Save.new
when 5 # ゲーム終了
@command6.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# ゲーム終了画面に切り替え
$scene = Scene_End.new
end
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (ステータスウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_status
case @command_window.index
when 1
@arrow.y = 105
@commands1.y = 42
@commands2.y = 100
@commands3.y = 162
@commands4.y = 222
@commands5.y = 282
@commands6.y = 342
@status_windowshadow1.y = 11
@status_windowshadow2.y = 110
@status_windowshadow3.y = 210
@status_windowshadow4.y = 310
@playtimegoldshadow.y = 406
when 2
@arrow.y = 165
@commands1.y = 39
@commands2.y = 97
@commands3.y = 159
@commands4.y = 219
@commands5.y = 279
@commands6.y = 339
@status_windowshadow1.y = 8
@status_windowshadow2.y = 107
@status_windowshadow3.y = 207
@status_windowshadow4.y = 307
@playtimegoldshadow.y = 403
when 3
@arrow.y = 225
@commands1.y = 36
@commands2.y = 94
@commands3.y = 156
@commands4.y = 216
@commands5.y = 276
@commands6.y = 336
@status_windowshadow1.y = 5
@status_windowshadow2.y = 104
@status_windowshadow3.y = 204
@status_windowshadow4.y = 304
@playtimegoldshadow.y = 400
end
#========================
case @status_window.index
when 0
@arrow_status.y = 37
@arrow_status.x = 260
when 1
@arrow_status.y = 137
@arrow_status.x = 265 - @status_window.index * 25
when 2
@arrow_status.y = 237
@arrow_status.x = 265 - @status_window.index * 25
when 3
@arrow_status.y = 337
@arrow_status.x = 265 - @status_window.index * 23
end
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
# コマンドウィンドウをアクティブにする
@command_window.active = true
@status_window.active = false
@status_window.index = -1
@arrow_status.visible = false
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
# コマンドウィンドウのカーソル位置で分岐
case @command_window.index
when 1 # スキル
# このアクターの行動制限が 2 以上の場合
if $game_party.actors[@status_window.index].restriction >= 2
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
@command2.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
@arrow_status.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# スキル画面に切り替え
$scene = Scene_Skill.new(@status_window.index)
when 2 # 装備
@command3.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
@arrow_status.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# 装備画面に切り替え
$scene = Scene_Equip.new(@status_window.index)
when 3 # ステータス
@command4.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
@arrow_status.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
作者:
xiaoma1013
时间:
2008-2-25 07:34
主题:《如何让脚本显示中文?》 原帖[LINE]1,#dddddd[/LINE]一个脚本只能显示英文,中文在游戏中不显示,脚本太大贴不出来,请高手帮帮忙,如何修改脚本就能显示中文了?
作者:
暴风の龙
时间:
2008-2-25 08:01
re:主题:《如何让脚本显示中文?》 [LINE]1,#dddddd[/LINE]什么意思?
如果不显示中文或许是你使用的软件系统不一样?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1