Project1

标题: 获取金钱的宽度值 [打印本页]

作者: 黑米馒头    时间: 2014-8-29 11:22
标题: 获取金钱的宽度值
下面的脚本,金币的宽度值的代码怎么输入
       carol3_66RPG.contents.draw_text(64,-8,金币宽度值,32, + "两银子。")


   carol3_66RPG.contents.draw_text(64,-8,240,32, + "两银子。")
  def command_125
    value = operate_value(@parameters[0], @parameters[1], @parameters[2])
    $game_party.gain_gold(value)
    if $game_switches[$不显示金钱窗口]==false
      carol3_66RPG = Window_Base.new((640-310)/2-5,432/2,310,48)
      carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
      if value >= 0

    carol3_66RPG.contents.draw_text(64,-8,240,32,value.abs.to_s )

       carol3_66RPG.contents.draw_text(64,-8,金币宽度值,32, + "两银子。")


作者: 恐惧剑刃    时间: 2014-8-29 12:03
carol3_66RPG.contents.text_size(value.abs.to_s).width




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