Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- Name: Dynamic Fonts {RGSS3 - VX Ace}
- Creator: KioKurashi
- Usage Requirements: Credits to Kio Kurashi for the script. Can be used
- Comercially or Non-comercially.
- Instructions: This script adds a new function to the message command in events.
- The keycode to use is \F[n] where n is the number of the of the place in the
- FONT_NAMES list located below. Fonts must be using their installed Font name
- or the game will not be able to find them. The 0(zero) is reserved as the
- default font "VL Gothic" if you would wish to change the font mid-message.
- The font can be changed as many times in a message as you would like, and
- will always revert to the default for the next message if not explicitly
- defined.
- Modify the FONT_NAMES list to the fonts that you desire.
- =end
- module CONFIGTEXT
- FONT_NAMES = ["Bodoni MT", "Arial Narrow", "Castellar"]
- end
- #################### Do Not Edit Beyond This Point ############################
- class Window_Base
- include CONFIGTEXT
- alias :reset_font_without_name :reset_font_settings
- def reset_font_settings
- reset_font_without_name
- contents.font.name = "VL Gothic"
- end
- def process_escape_character(code, text, pos)
- case code.upcase
- when 'C'
- change_color(text_color(obtain_escape_param(text)))
- when 'I'
- process_draw_icon(obtain_escape_param(text), pos)
- when '{'
- make_font_bigger
- when '}'
- make_font_smaller
- when 'F'
- alter_font(obtain_escape_param(text))
- end
- end
- def alter_font(number)
- number == 0 ? fontname = "VL Gothic" : fontname = FONT_NAMES[number-1]
- contents.font.name = fontname
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement