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

@ -46,6 +46,7 @@ class Game_Temp
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_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)
@ -87,6 +88,7 @@ class Scene_Map
@item_menu.dispose
@fast_travel.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
@ -266,6 +268,7 @@ class Scene_Map
# Update fast travel
@fast_travel.update
@window_settings.update
@window_debug.update
if Input.trigger?(Input::F8) && !$game_switches[123]
if Graphics.fullscreen == true
@ -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
$game_temp.window_debug_calling = true
@fade_out = true
end
return
end
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,7 +114,6 @@ class Window_TPtL < Window_Selectable
@fade_out = true
return
end
end
# Select menu item
if Input.trigger?(Input::ACTION)
@ -132,3 +130,4 @@ class Window_TPtL < Window_Selectable
@fade_out = true
end
end
end