Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module GameData
- module Colors
- Fonts.define_fill_color(24, Color.new(0, 0, 0))
- Fonts.define_shadow_color(24, Color.new(148, 148, 165))
- end
- end
- class Spriteset_Map
- PANNEL_COORDINATES = {
- 0 => {
- bg_x: 10,
- bg_y: -25,
- txt_height: 27,
- txt_x: 15,
- txt_y: -20,
- fill_color: 24
- },
- 10 => {
- bg_x: 4,
- bg_y: -24,
- txt_height: 27,
- txt_x: 14,
- txt_y: -20, # <= Fix this value
- fill_color: 24
- }
- }
- PANNEL_COORDINATES.default = PANNEL_COORDINATES[0]
- def create_panel(zone)
- return unless zone && GameData::Zone.get(zone).panel_id > 0
- coords = PANNEL_COORDINATES[pid = GameData::Zone.get(zone).panel_id]
- @sp_bg ||= Sprite.new
- @sp_bg.set_position(coords[:bg_x], coords[:bg_y])
- @sp_bg.z = 5001
- @sp_bg.bitmap = RPG::Cache.windowskin("pannel_#{pid}")
- map_name = PFM::Text.parse_string_for_messages(GameData::Zone.get(zone).map_name)
- color = coords[:fill_color]
- map_name.gsub!(/\\c\[([0-9]+)\]/) do
- color = $1.to_i
- nil
- end
- @sp_fg&.dispose
- @sp_fg = Text.new(0, nil, coords[:txt_x], coords[:txt_y], 0, coords[:txt_height],
- map_name, 0, Text::Util::DEFAULT_OUTLINE_SIZE, color)
- @sp_fg.z = 5002
- @counter = 0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement