以下引用艾路塞尔于2008-2-20 12:56:30的发言:
不行啊,窗口位置居中了但是文字还是重叠的呀。
def show_gain_window(type, value)
snstar2006_66rpg_item = $data_armors[@params[0]]
snstar2006_66rpg = Window_Base.new((640-300)/2,128,200,100)
snstar2006_66rpg.contents = Bitmap.new(snstar2006_66rpg.width - 32, snstar2006_66rpg.height - 32)
if value >= 0
gain_text = "获得"
else
gain_text = "失去"
end
case type
when 0
gain_type = "金钱"
if value >=0
Audio.se_play($gain_gold_se,80,100)
else
Audio.se_play("Audio/SE/"+"Item1",80,100)
end
when 1
gain_type = "物品"
string = $data_items[@params[0]]
if value >=0
Audio.se_play($gain_item_se,80,100)
else
Audio.se_play($loss_item_se,80,100)
end
when 2
gain_type = "武器"
string = $data_weapons[@params[0]]
if value >=0
Audio.se_play($gain_weapon_se,80,100)
else
Audio.se_play($loss_weapon_se,80,100)
end
when 3
gain_type = "防具"
string = $data_armors[@params[0]]
if value >=0
Audio.se_play($gain_armor_se,80,100)
else
Audio.se_play($loss_armor_se,80,100)
end
end
snstar2006_66rpg.contents.draw_text(0,0,160,32,gain_text+gain_type+":")
unless type == 0
snstar2006_66rpg.draw_item_name(string, 28, 32, true)
snstar2006_66rpg.contents.draw_text(0, 32, 150, 32, "×"+value.abs.to_s, 2)
else
snstar2006_66rpg.contents.draw_text(32,32,240,32,value.abs.to_s + " "+ Vocab::gold)
end
snstar2006_66rpg.opacity = 160
for i in 0..30
Graphics.update
end
for i in 0..10
snstar2006_66rpg.opacity -= 30
snstar2006_66rpg.contents_opacity -= 30
Graphics.update
end
snstar2006_66rpg.dispose
end
def show_gain_level_window(actor,value)
lvstring = Vocab::level
snstar2006_66rpg = Window_Base.new((640-300)/2,128,200,100)
snstar2006_66rpg.contents = Bitmap.new(snstar2006_66rpg.width - 32, snstar2006_66rpg.height - 32)
if value >= 0
gain_text = "提升"
Audio.se_play($gain_lv_se,80,100)
else
gain_text = "降低"
Audio.se_play($loss_lv_se,80,100)
end
snstar2006_66rpg.contents.draw_text(0, 0, 108, 32, actor.name)
string = lvstring+gain_text+value.abs.to_s+"级"
snstar2006_66rpg.contents.draw_text(32,32,160,32,string)
snstar2006_66rpg.opacity = 160
for i in 0..30
Graphics.update
end
for i in 0..10
snstar2006_66rpg.opacity -= 30
snstar2006_66rpg.contents_opacity -= 30
Graphics.update
end
snstar2006_66rpg.dispose
end
end
snstar2006_66rpg.contents.draw_text(0, 32, 150, 32, "×"+value.abs.to_s, 2)
以下引用艾路塞尔于2008-2-20 13:38:43的发言:
谢谢了,问题解决~
PS,话说用了那个640*480的脚本后许多有关窗口显示的脚本都需要重新调整的说...
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |