Double hats menu

This commit is contained in:
chardub
2025-03-09 12:48:32 -04:00
parent e9bdea5bad
commit 8b8b348ed1
10 changed files with 35 additions and 25 deletions

View File

@@ -207,7 +207,7 @@ def pbPositionFaceWindow(facewindow,msgwindow)
end
end
def pbPositionNearMsgWindow(cmdwindow,msgwindow,side)
def pbPositionNearMsgWindow(cmdwindow,msgwindow,side, x_offset=nil,y_offset=nil)
return if !cmdwindow
if msgwindow
height=[cmdwindow.height,Graphics.height-msgwindow.height].min
@@ -234,6 +234,10 @@ def pbPositionNearMsgWindow(cmdwindow,msgwindow,side)
cmdwindow.x=0
cmdwindow.y=0
end
cmdwindow.x+= x_offset if x_offset
cmdwindow.y+= y_offset if y_offset
end
# internal function

View File

@@ -909,7 +909,7 @@ def pbMessageChooseNumber(message, params, &block)
end
def pbShowCommands(msgwindow, commands = nil, cmdIfCancel = 0, defaultCmd = 0)
def pbShowCommands(msgwindow, commands = nil, cmdIfCancel = 0, defaultCmd = 0, x_offset=nil, y_offset=nil)
return 0 if !commands
$PokemonTemp.speechbubble_arrow.visible =false if $PokemonTemp.speechbubble_arrow && !$PokemonTemp.speechbubble_arrow.disposed?
if defaultCmd == 0 && ($game_variables && $game_variables[VAR_COMMAND_WINDOW_INDEX] != 0)
@@ -919,7 +919,7 @@ def pbShowCommands(msgwindow, commands = nil, cmdIfCancel = 0, defaultCmd = 0)
cmdwindow.z = 99999
cmdwindow.visible = true
cmdwindow.resizeToFit(cmdwindow.commands)
pbPositionNearMsgWindow(cmdwindow, msgwindow, :right)
pbPositionNearMsgWindow(cmdwindow, msgwindow, :right, x_offset, y_offset)
cmdwindow.index = defaultCmd
command = 0
loop do