asiuoretusoprtghuisdg

This commit is contained in:
Issac332 2026-06-04 16:25:57 +03:00
parent bbb4d4fc27
commit 9c8460a245
5 changed files with 59 additions and 43 deletions

View file

@ -77,7 +77,7 @@ set(scripts
i18n_English.rb
i18n_Japanese.rb
i18n_Language.rb
Window_TPtL
Window_TPtL.rb
Settings.rb)
find_program(RUBY_EXE ruby

View file

@ -45,7 +45,8 @@ class Game_Temp
attr_accessor :menu_calling # menu calling flag
attr_accessor :item_menu_calling # item menu calling flag
attr_accessor :travel_menu_calling # fast travel menu calling flag
attr_accessor :window_settings_calling # fast travel menu calling flag
attr_accessor :window_settings_calling # fast travel menu calling flag
attr_accessor :window_debug_calling # fast travel menu calling flag
attr_accessor :menu_beep # menu: play sound effect flag
attr_accessor :save_calling # save calling flag
attr_accessor :debug_calling # debug calling flag
@ -106,6 +107,7 @@ class Game_Temp
@item_menu_calling = false
@travel_menu_calling = false
@window_settings_calling = false
@window_debug_calling = false
@menu_beep = false
@save_calling = false
@debug_calling = false

View file

@ -51,6 +51,7 @@ class Scene_Map
# Make fast travel menu
@fast_travel = FastTravel.new
@window_settings = Window_Settings.new
@window_debug = Window_TPtL.new
# Fade to black transition
@blackfade = Sprite.new
@blackfade.bitmap = Bitmap.new(Graphics.width, Graphics.height)
@ -86,7 +87,8 @@ class Scene_Map
@menu.dispose
@item_menu.dispose
@fast_travel.dispose
@window_settings.dispose
@window_settings.dispose
@window_debug.dispose
# Dispose of item icon
@item_icon.dispose
@item_icon_flash.dispose
@ -147,7 +149,7 @@ class Scene_Map
return
end
$game_system.map_interpreter.update
$game_temp.menus_visible = @menu.visible || @item_menu.visible || @fast_travel.visible || @window_settings.visible
$game_temp.menus_visible = @menu.visible || @item_menu.visible || @fast_travel.visible || @window_settings.visible || @window_debug.visible
$game_player.update
$game_followers.each{|f| f.update}
# Update system (timer), screen
@ -196,13 +198,13 @@ class Scene_Map
@item_icon.bitmap = nil
@item_icon_flash.bitmap = nil
else
name = $data_items[@item_id].icon_name
translation_name = "#{$persistent.langcode}/#{name}"
name = $data_items[@item_id].icon_name
translation_name = "#{$persistent.langcode}/#{name}"
if File.exist?("Graphics/Icons/#{translation_name}.png")
@item_icon.bitmap = RPG::Cache.icon(translation_name)
else
else
@item_icon.bitmap = RPG::Cache.icon(name)
end
end
@item_icon.zoom_x = 2.0
@item_icon.zoom_y = 2.0
@ -265,21 +267,22 @@ class Scene_Map
end
# Update fast travel
@fast_travel.update
@window_settings.update
@window_settings.update
@window_debug.update
if Input.trigger?(Input::F8) && !$game_switches[123]
if Graphics.fullscreen == true
Graphics.fullscreen = false
$console = false
else
Graphics.fullscreen = true
$console = true
end
sleep(0.500)
if @window_settings.visible
@window_settings.redraw_setting_index(2)
sleep(0.500)
end
Graphics.fullscreen = false
$console = false
else
Graphics.fullscreen = true
$console = true
end
sleep(0.500)
if @window_settings.visible
@window_settings.redraw_setting_index(2)
sleep(0.500)
end
end
# If showing message window
if $game_temp.message_window_showing || @ed_message.visible || @doc_message.visible || @desktop_message.visible || @credits_message.visible
@ -288,7 +291,7 @@ class Scene_Map
# Process menu opening
unless $game_system.map_interpreter.running? ||
$game_system.menu_disabled ||
@fast_travel.visible || @window_settings.visible || $game_temp.menu_calling == true || $game_temp.item_menu_calling == true
@fast_travel.visible || @window_settings.visible || @window_debug.visible || $game_temp.menu_calling == true || $game_temp.item_menu_calling == true
if !@menu.visible && Input.trigger?(Input::MENU)
$game_temp.menu_calling = true
$game_temp.menu_beep = true
@ -328,6 +331,8 @@ class Scene_Map
call_travel_menu
elsif $game_temp.window_settings_calling
call_window_settings
elsif $game_temp.window_debug_calling
call_window_debug
elsif $game_temp.save_calling
call_save
elsif $game_temp.debug_calling
@ -427,6 +432,14 @@ class Scene_Map
# Open the menu
@window_settings.open
end
def call_window_debug
# Clear menu call flag
$game_temp.window_debug_calling = false
# Straighten player position
$game_player.straighten
# Open the menu
@window_debug.open
end
#--------------------------------------------------------------------------
# * Debug Call
#--------------------------------------------------------------------------

View file

@ -2,6 +2,9 @@
class Window_MainMenu < Window_Selectable
def initialize
super(Graphics.width / 2 - 304, 16, 608, 64)
#kostil' ebanyy
@debug_menu = ::Window_TPtL.new
# Set up menu options
@commands = Array.new
@commands << 'Fast Travel'
@ -150,11 +153,10 @@ class Window_MainMenu < Window_Selectable
$game_temp.window_settings_calling = true
@fade_out = true
when 3
@menu = ::Window_TPtL.new
@menu.open
@menu.dispose
end
$game_temp.window_debug_calling = true
@fade_out = true
end
return
end
end
end

View file

@ -1,11 +1,11 @@
# The main menu window
class Window_TPtL < Window_Selectable
def initialize
super(Graphics.width, 64, Graphics.height, 64)
super(16, 16, Graphics.width - 32, Graphics.height - 32)
@mapinfo = load_data("Data/MapInfos.rxdata")
@item_max = 262
@column_max = @item_max
@column_max = Graphics.width > 600 ? 4 : 2
# Make invisible by default
self.visible = false
@ -15,7 +15,7 @@ class Window_TPtL < Window_Selectable
@fade_out = false
# Render menu
self.contents = Bitmap.new(width - 32, 32)
self.contents = Bitmap.new(width - 32, @item_max * 32)
Language.register_text_sprite(self.class.name + "_contents", self.contents)
for i in 0...@item_max
draw_item(i, normal_color)
@ -38,11 +38,11 @@ class Window_TPtL < Window_Selectable
# Set color
self.contents.font.color = color
# Get width of text and cap
w = self.width / @item_max
x = index % @column_max
y = index / @column_max
# Update item
rect = Rect.new(w * index, 0, w - 32, 32)
rect = Rect.new(self.width / @column_max * x, 32 * y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, tr(@mapinfo&.[](index)&.name || "EMPTY"), 1)
end
@ -104,7 +104,6 @@ class Window_TPtL < Window_Selectable
return
end
# Cancel menu
if Input.trigger?(Input::CANCEL) ||
Input.trigger?(Input::MENU) ||
@ -115,20 +114,20 @@ class Window_TPtL < Window_Selectable
@fade_out = true
return
end
end
# Select menu item
if Input.trigger?(Input::ACTION)
self.active = false
self.opacity = 127
$game_temp.player_transferring = true
$game_temp.player_new_map_id = @index
$game_temp.player_new_x = 0
$game_temp.player_new_y = 0
$game_temp.player_new_direction = 0
Graphics.freeze
$game_temp.transition_processing = true
$game_temp.transition_name = ""
@fade_out = true
$game_temp.player_transferring = true
$game_temp.player_new_map_id = @index
$game_temp.player_new_x = 0
$game_temp.player_new_y = 0
$game_temp.player_new_direction = 0
Graphics.freeze
$game_temp.transition_processing = true
$game_temp.transition_name = ""
@fade_out = true
end
end
end