Project1
标题:
物品裝備的說明問題
[打印本页]
作者:
米血
时间:
2013-6-19 23:03
标题:
物品裝備的說明問題
本帖最后由 米血 于 2013-6-22 09:01 编辑
物品或裝備的說明簡介如果過長字體都會被壓縮
搜尋到的古文似乎都沒有答案
曾經有看過別人的作品的說明文是跑馬燈方式
那種的是腳本嗎?
作者:
彭格列第XI代
时间:
2013-6-20 22:25
跑馬燈方式= =?
作者:
a364774426
时间:
2013-6-21 22:55
#===============================================================================
# Scrolling Window_Help
#-------------------------------------------------------------------------------
# Version: 1.1a
# Author: Cozziekuns (rmrk)
# Last Date Updated: 12/6/2011
#===============================================================================
# Description:
#-------------------------------------------------------------------------------
# This script allows you to auto scroll the text in Window_Help if it becomes
# too long for the window to hold. Originally, RPG Maker would auto resize the
# text to make it thin and aesthetically displeasing to the eye.
#===============================================================================
# Updates
# ------------------------------------------------------------------------------
# o 12/06/2011 - Started Script
# o 09/07/2011 - Updated script with a bugfix.
#===============================================================================
# Instructions
# ------------------------------------------------------------------------------
# Copy and paste this script above ? Main Process but below ? Materials, and
# edit the modules to your liking.
#===============================================================================
module COZZIEKUNS
module SCROLLING_WINDOW_HELP
SCROLL_SPEED = 1 # The higher the scroll speed, the faster the text will scroll.
SCROLL_REFRESH_RATE = 1 # The lower the refresh rate, the faster the text will scroll.
SCROLL_INITIAL_WAIT = 60 # The amount of time before the text starts to scroll (in milliseconds)
end
end
#==============================================================================
# ** Window_Help
#------------------------------------------------------------------------------
# This window shows skill and item explanations along with actor status.
#==============================================================================
class Window_Help < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias coz_scrolltxt_wh_14199_initialize initialize
def initialize(*args)
coz_scrolltxt_wh_14199_initialize
@scroll = false
@frames = 0
end
#--------------------------------------------------------------------------
# * Set Text
# text : character string displayed in window
# align : alignment (0..flush left, 1..center, 2..flush right)
#--------------------------------------------------------------------------
def set_text(text, align = 0)
if text != @text or align != @align
text_width = contents.text_size(text).width + 40 > self.contents.width - 40
text_width = false if align != 0
if text_width
self.contents = Bitmap.new(self.width + contents.text_size(text).width + 8, self.height - 32)
@scroll = true
else
self.contents = Bitmap.new(self.width - 32, self.height - 32)
@scroll = false
end
self.ox = 0
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, text_width ? self.contents.text_size(text).width : self.width - 40, WLH, text, align)
@text = text
@align = align
@frames = 0
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
@frames += 1
f_refresh = COZZIEKUNS::SCROLLING_WINDOW_HELP::SCROLL_REFRESH_RATE
f_wait = COZZIEKUNS::SCROLLING_WINDOW_HELP::SCROLL_INITIAL_WAIT
speed = COZZIEKUNS::SCROLLING_WINDOW_HELP::SCROLL_SPEED
if @scroll == true
if (Graphics.frame_count % f_refresh == 0) and @frames >= f_wait
self.ox += speed
end
if self.ox >= self.contents.text_size(@text).width
self.ox = -self.contents.text_size(@text).width / 2
end
end
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1