Project1

标题: 战斗后获得物品提示显示问题 [打印本页]

作者: scgjgj    时间: 2008-3-21 07:31
标题: 战斗后获得物品提示显示问题
如题,具体请看下图

麻烦告诉我下应该如何调整。最好可以改成好几行显示得到物品的方框之类的,总之美化一些就可以了。
拜托啦。。。{/se}{/wx}{/tp}
作者: 水迭澜    时间: 2008-3-21 07:39
window_battleresult
initialize部分改super里的第四个值,为高
然后就是refresh部分要改掉exp等的Y值……
其实你是不是不小心把默认的覆盖了……
作者: 沉影不器    时间: 2008-3-21 16:42
提示: 作者被禁止或删除 内容自动屏蔽
作者: scgjgj    时间: 2008-3-21 18:11
  def initialize(exp, gold, treasures)
    @exp = exp
    @gold = gold
    @treasures = treasures
    super(160, 0, 320, @treasures.size * 32 + 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.y = 160 - height / 2
    self.back_opacity = 160
    self.visible = false
    $game_variables[25] *= $game_variables[24]+1
    $game_variables[44] += $game_variables[25]
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    x = 4
    self.contents.font.color = normal_color
    cx = contents.text_size(@exp.to_s).width
    self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
    x += cx + 4
    self.contents.font.color = system_color
    cx = contents.text_size("EXP").width
    self.contents.draw_text(x, 0, 64, 32, "EXP")
    x += cx + 16
    self.contents.font.color = normal_color
    cx = contents.text_size(@gold.to_s).width
    self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
    x += cx + 4
    self.contents.font.color = system_color
    self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
    y = 32
    self.contents.font.color = normal_color
    self.contents.draw_text(0,0,128-64,32,$game_variables[25].to_s,2)
    self.contents.font.color = system_color
    self.contents.draw_text(0,0,128,32,"魔感",2)
    y = 64
    for item in @treasures
      draw_item_name(item, 4, y)
      y += 32
    end
  end
end

能详细些吗?我才开始学。哪里不对哦?{/ll}
作者: 沉影不器    时间: 2008-3-21 18:33
提示: 作者被禁止或删除 内容自动屏蔽
作者: scgjgj    时间: 2008-3-21 20:30
{/fd}不行嘛。提示框是更大了,显示的文字还是堆在一起了{/fd}
作者: 沉影不器    时间: 2008-3-21 22:34
提示: 作者被禁止或删除 内容自动屏蔽
作者: scgjgj    时间: 2008-3-22 02:20
谢谢,好了{/qiang}{/qiang}十分感谢

作者: xiarongshan    时间: 2008-3-22 02:21
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1