mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
-further localization changes for chinese version
-language will now default to chinese if "zh_CN.ver" file is present in root directory
This commit is contained in:
parent
611aadf92d
commit
5e8fb00585
5 changed files with 37 additions and 6 deletions
|
|
@ -24,6 +24,9 @@ class Persistent
|
|||
|
||||
def initialize
|
||||
self.lang = LanguageCode.new(Steam::LANG || Oneshot::LANG)
|
||||
if File.exists?("zh_CN.ver")
|
||||
self.lang = LanguageCode.new("zh_CN")
|
||||
end
|
||||
end
|
||||
|
||||
# Members
|
||||
|
|
|
|||
|
|
@ -169,7 +169,18 @@ class Scene_Map
|
|||
@item_icon.bitmap = nil
|
||||
@item_icon_flash.bitmap = nil
|
||||
else
|
||||
@item_icon.bitmap = RPG::Cache.icon($data_items[@item_id].icon_name)
|
||||
name = $data_items[@item_id].icon_name
|
||||
translation_name = "#{$persistent.langcode}/#{name}"
|
||||
if File.exists?("Graphics/Icons/#{translation_name}.png")
|
||||
@item_icon.bitmap = RPG::Cache.icon(translation_name)
|
||||
@item_icon.zoom_x = 1.0
|
||||
@item_icon.zoom_y = 1.0
|
||||
else
|
||||
@item_icon.bitmap = RPG::Cache.icon(name)
|
||||
@item_icon.zoom_x = 2.0
|
||||
@item_icon.zoom_y = 2.0
|
||||
end
|
||||
|
||||
if @item_id == 58 #clover
|
||||
@item_icon_flash.bitmap = RPG::Cache.icon($data_items[@item_id].icon_name + "2")
|
||||
@item_icon_flash.opacity = 0
|
||||
|
|
|
|||
|
|
@ -45,7 +45,15 @@ class Scene_Title
|
|||
@window_settings_title = Window_Settings.new
|
||||
# Make title graphic
|
||||
@sprite = Sprite.new
|
||||
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
|
||||
|
||||
# chinese has its own special title screen so check for it
|
||||
translation_name = "#{$persistent.langcode}/#{$data_system.title_name}"
|
||||
if File.exists?("Graphics/Titles/#{translation_name}.png")
|
||||
@sprite.bitmap = RPG::Cache.title(translation_name)
|
||||
else
|
||||
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
|
||||
end
|
||||
|
||||
@sprite.zoom_x = 2.0
|
||||
@sprite.zoom_y = 2.0
|
||||
# Create/render menu options
|
||||
|
|
|
|||
|
|
@ -28,7 +28,12 @@ class Spriteset_Map
|
|||
if $game_map.tileset_name == "blank"
|
||||
@tilemap.tileset = nil
|
||||
else
|
||||
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
|
||||
translation_name = "#{$persistent.langcode}/#{$game_map.tileset_name}"
|
||||
if File.exists?("Graphics/Tilesets/#{translation_name}.png")
|
||||
@tilemap.tileset = RPG::Cache.tileset(translation_name)
|
||||
else
|
||||
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
|
||||
end
|
||||
end
|
||||
for i in 0..6
|
||||
autotile_name = $game_map.autotile_names[i]
|
||||
|
|
|
|||
|
|
@ -79,12 +79,16 @@ class Window_Item < Window_Selectable
|
|||
# Geometry
|
||||
x = index % 2 * (self.width / COLUMN_MAX)
|
||||
y = index / 2 * 32
|
||||
off = index == @index ? 2 : 0
|
||||
rect = Rect.new(x + 32, y, self.width / COLUMN_MAX - 64, 32)
|
||||
self.contents.draw_text(rect, item.name, 1)
|
||||
|
||||
bitmap = RPG::Cache.icon(item.icon_name)
|
||||
self.contents.blt(x + off, y + off, bitmap, Rect.new(off, off, 32 - off * 2, 32 - off * 2), self.contents.font.color.alpha)
|
||||
translation_name = "#{$persistent.langcode}/#{item.icon_name}"
|
||||
if File.exists?("Graphics/Icons/#{translation_name}.png")
|
||||
bitmap = RPG::Cache.icon(translation_name)
|
||||
else
|
||||
bitmap = RPG::Cache.icon(item.icon_name)
|
||||
end
|
||||
self.contents.stretch_blt(Rect.new(x, y, 32, 32), bitmap, Rect.new(0, 0, bitmap.width, bitmap.height), self.contents.font.color.alpha)
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Help Text Update
|
||||
|
|
|
|||
Loading…
Reference in a new issue