Project1

标题: 如何在標題畫面添加文字窗口?(已解決) [打印本页]

作者: 冷徹心扉    时间: 2015-11-12 11:38
标题: 如何在標題畫面添加文字窗口?(已解決)
本帖最后由 冷徹心扉 于 2015-11-12 22:54 编辑

我想在標題畫面增加一個可自訂文字的區塊
用來顯示版本號碼等的用途
請問該怎麼做呢?
作者: 正太君    时间: 2015-11-12 16:36
RUBY 代码复制
  1. class Scene_Title
  2.   alias :old_start :start
  3.   alias :old_terminate :terminate
  4.   def start
  5.     old_start
  6.     @text_sprite = Sprite.new
  7.     @text_sprite.x = 400
  8.     @text_sprite.y = 390
  9.     @text_sprite.bitmap = Bitmap.new(140,20)
  10.     @text_sprite.bitmap.font.color = Color.new(255,255,0)
  11.     @text_sprite.bitmap.draw_text(0,0,140,20,"聪聪全国第三帅")
  12.   end
  13.   def terminate
  14.     old_terminate
  15.     @text_sprite.bitmap.dispose
  16.     @text_sprite.dispose
  17.   end
  18. end





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