- Joined
- Oct 28, 2023
- Posts
- 280
sorry for this small mistakei found out what was wrong needed a s at the end
sorry for this small mistakei found out what was wrong needed a s at the end
Can you add key items to the menu?
MenuHandlers.add(:pause_menu, :keyitem, {
"name" => _INTL("Key Item"),
"icon_name" => "keyitem",
"condition" => proc { next $bag.has?(:KEYITEM) },
"order" => 69,
"effect" => proc { |menu|
pbFadeOutIn {
pbUseKeyItemInField(:KEYITEM)
}
next false
}
})
This plugin still works with v21Will this be updated for v21?
def shift_cursor(direction)
return false if @entries.length < 2
@current_selection += direction
# keep selection within array bounds
@current_selection = @entries.length - 1 if @current_selection < 0
@current_selection = 0 if @current_selection >= @entries.length
# Shift array elements
if direction < 0
el = @entries.length - 1
temp = @entry_indices[el].clone
@entry_indices[el] = nil
e_temp = @entry_indices.clone
(el + 1).times { |i| @entry_indices[i + 1] = e_temp[i] }
@entry_indices[0] = temp
@entry_indices.compact!
else
ret = @entry_indices.shift
@entry_indices.push(ret)
end
pbSEPlay(MENU_CURSOR_SOUND)
# Reset the duration variable to a larger value to make it slower
duration = 100
case $PokemonSystem.screensize
when 4 # fullscreen
duration = 15
end
# Rest of the code remains unchanged
middle = @disp_indices.length / 2
if @disp_indices.length < 3
recalc_icon_positions
duration.times do
Graphics.update
@menu.components.each { |component| component.update }
pbUpdateSpriteHash(@sprites)
end
return
end
duration.times do
Graphics.update
pbUpdateSpriteHash(@sprites)
@menu.components.each { |component| component.update }
pbUpdateSceneMap
@sprites.each do |key, sprite|
next if !key[/icon/]
total = (direction > 0) ? @icon_offset_left[key] : @icon_offset_right[key]
amt2 = total / (duration * 1.0)
amt = ((direction > 0) ? amt2.floor : amt2.ceil).to_i
amt -= (direction * 1) if @disp_indices.length < 5
sprite.x += amt
final_pos = (@icon_base_x[key] + total)
base_x = direction > 0 ? (sprite.x <= final_pos) : (sprite.x >= final_pos)
sprite.x = (@icon_base_x[key] + total) if base_x
end
@sprites["icon_#{middle}"].zoom_x -= (ACTIVE_SCALE - 1.0) / duration
@sprites["icon_#{middle}"].zoom_y -= (ACTIVE_SCALE - 1.0) / duration
mdr = middle + direction
mdr = mdr.clamp(0, 6)
@sprites["icon_#{mdr}"].zoom_x += (ACTIVE_SCALE - 1.0) / duration
@sprites["icon_#{mdr}"].zoom_y += (ACTIVE_SCALE - 1.0) / duration
end
UseIs there a way I could change the theme on a script event not in Options menu? like in example change the theme base on which region u're in.
$PokemonSystem.current_menu_theme = value
. Also, make sure to set this
I have the exact same problem- whenever I open the menu it instantly opens my Pokedex. Person on the previous page said to do a full recompile and I did, no luck. Do you have any other specific plugins installed? Maybe we both have the same problematic one?Hi, i just install the plugin i didnt get error when i lauch the game but when i open my ui, I can't choose my menu, the game automatically use the last menu used
I've been having this "issue" myself, and I figured out how to fix it. This might also only be happening if you're using DiegoWT's Bag Screen w/ Party plugin btw.Just installed the plugin and it's working wonderfully. However, I did notice that every time you use an item from the bag or you save, the close menu sound plays (I'm not sure if the fix from v2.1 is related to that or if I did something wrong). Anyone knows how to fix that?