mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
update 6.7
This commit is contained in:
@@ -85,7 +85,7 @@ class CharacterSelectMenuPresenter
|
||||
update_cursor(@current_index)
|
||||
@name = getDefaultName if @name == ""
|
||||
updateDisplayedName(getOptionIndex(OPTION_NAME))
|
||||
cmd = pbMessage("Is this information correct?", [_INTL("Yes"), _INTL("No")])
|
||||
cmd = pbMessage(_INTL("Is this information correct?"), [_INTL("Yes"), _INTL("No")])
|
||||
if cmd == 0
|
||||
pbSEPlay("GUI naming confirm", 80, 100)
|
||||
#pbMessage("You will be able to customize your appearance further while playing")
|
||||
|
||||
@@ -9,11 +9,19 @@ class PokemonHatPresenter
|
||||
|
||||
@x_pos = pokemon.hat_x ? pokemon.hat_x : 0
|
||||
@y_pos = pokemon.hat_y ? pokemon.hat_y : 0
|
||||
@hat_mirrored_horizontal = pokemon.hat_mirrored_horizontal ? pokemon.hat_mirrored_horizontal : false
|
||||
@hat_mirrored_vertical = pokemon.hat_mirrored_vertical ? pokemon.hat_mirrored_vertical : false
|
||||
@hat_id = pokemon.hat ? pokemon.hat : 1
|
||||
@viewport = nil
|
||||
@previewwindow = nil
|
||||
|
||||
@original_pokemon_bitmap = nil
|
||||
|
||||
@min_x, @max_x = -64, 88
|
||||
@min_y, @max_y = -120, 120 # Safe symmetric range
|
||||
|
||||
@hatBitmapWrapper = AnimatedBitmap.new(@hatFilename, 0) if pbResolveBitmap(@hatFilename)
|
||||
|
||||
end
|
||||
|
||||
def pbStartScreen
|
||||
@@ -31,6 +39,8 @@ class PokemonHatPresenter
|
||||
|
||||
def updatePokemonHatPosition()
|
||||
@pokemon.hat = @hat_id
|
||||
@pokemon.hat_mirrored_horizontal=@hat_mirrored_horizontal
|
||||
@pokemon.hat_mirrored_vertical=@hat_mirrored_vertical
|
||||
@pokemon.hat_x = @x_pos
|
||||
@pokemon.hat_y = @y_pos
|
||||
end
|
||||
@@ -49,6 +59,9 @@ class PokemonHatPresenter
|
||||
Input.update
|
||||
@hat_id = selector.selectNextOutfit(@hat_id, 1, selector.hats_list, [], false, "hat",$Trainer.unlocked_hats,false) if Input.trigger?(Input::RIGHT)
|
||||
@hat_id = selector.selectNextOutfit(@hat_id, -1, selector.hats_list, [], false, "hat",$Trainer.unlocked_hats,false) if Input.trigger?(Input::LEFT)
|
||||
flipHatVertically if Input.trigger?(Input::JUMPUP)
|
||||
flipHatHorizontally if Input.trigger?(Input::JUMPDOWN)
|
||||
resetHatPosition if Input.trigger?(Input::SPECIAL)
|
||||
break if Input.trigger?(Input::USE)
|
||||
return false if Input.trigger?(Input::BACK)
|
||||
@view.update()
|
||||
@@ -60,15 +73,18 @@ class PokemonHatPresenter
|
||||
|
||||
def position_hat
|
||||
@view.display_move_arrows
|
||||
min_x, max_x = -64, 88
|
||||
min_y, max_y = -20, 140
|
||||
|
||||
loop do
|
||||
Graphics.update
|
||||
Input.update
|
||||
@x_pos += PIXELS_PER_MOVEMENT if Input.repeat?(Input::RIGHT) && @x_pos < max_x
|
||||
@x_pos -= PIXELS_PER_MOVEMENT if Input.repeat?(Input::LEFT) && @x_pos > min_x
|
||||
@y_pos += PIXELS_PER_MOVEMENT if Input.repeat?(Input::DOWN) && @y_pos < max_y
|
||||
@y_pos -= PIXELS_PER_MOVEMENT if Input.repeat?(Input::UP) && @y_pos > min_y
|
||||
@x_pos += PIXELS_PER_MOVEMENT if Input.repeat?(Input::RIGHT) && @x_pos < @max_x
|
||||
@x_pos -= PIXELS_PER_MOVEMENT if Input.repeat?(Input::LEFT) && @x_pos > @min_x
|
||||
@y_pos += PIXELS_PER_MOVEMENT if Input.repeat?(Input::DOWN) && @y_pos < @max_y
|
||||
@y_pos -= PIXELS_PER_MOVEMENT if Input.repeat?(Input::UP) && @y_pos > @min_y
|
||||
flipHatHorizontally if Input.trigger?(Input::JUMPDOWN)
|
||||
flipHatVertically if Input.trigger?(Input::JUMPUP)
|
||||
resetHatPosition if Input.trigger?(Input::SPECIAL)
|
||||
|
||||
break if Input.trigger?(Input::USE)
|
||||
return false if Input.trigger?(Input::BACK)
|
||||
@view.update()
|
||||
@@ -77,6 +93,46 @@ class PokemonHatPresenter
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
|
||||
def flipHatHorizontally()
|
||||
@hat_mirrored_horizontal = !@hat_mirrored_horizontal
|
||||
pbSEPlay("GUI storage pick up")
|
||||
@hatBitmapWrapper.mirror_horizontally
|
||||
pbWait(8)
|
||||
end
|
||||
|
||||
|
||||
def flipHatVertically()
|
||||
pbSEPlay("GUI storage pick up")
|
||||
@hat_mirrored_vertical = !@hat_mirrored_vertical
|
||||
@hatBitmapWrapper.mirror_vertically
|
||||
|
||||
# Compensate for visual shift after vertical flip
|
||||
hat_height = @hatBitmapWrapper.bitmap.height
|
||||
offset = hat_height - 40
|
||||
|
||||
if @hat_mirrored_vertical
|
||||
@y_pos -= offset
|
||||
else
|
||||
@y_pos += offset
|
||||
end
|
||||
@y_pos = [[@y_pos, @min_y].max, @max_y].min
|
||||
pbWait(8)
|
||||
end
|
||||
|
||||
def resetHatPosition
|
||||
if pbConfirmMessage(_INTL("Reset hat position?"))
|
||||
pbSEPlay("GUI naming tab swap end")
|
||||
@x_pos=0
|
||||
@y_pos=0
|
||||
@hatBitmapWrapper.mirror_horizontally if @hat_mirrored_horizontal
|
||||
@hatBitmapWrapper.mirror_vertically if @hat_mirrored_vertical
|
||||
@hat_mirrored_horizontal = false
|
||||
@hat_mirrored_vertical = false
|
||||
end
|
||||
end
|
||||
|
||||
def initialize_bitmap()
|
||||
spriteLoader = BattleSpriteLoader.new
|
||||
|
||||
@@ -94,9 +150,9 @@ class PokemonHatPresenter
|
||||
|
||||
def getPokemonHatBitmap()
|
||||
@hatFilename = getTrainerSpriteHatFilename(@hat_id)
|
||||
hatBitmapWrapper = AnimatedBitmap.new(@hatFilename, 0) if pbResolveBitmap(@hatFilename)
|
||||
@hatBitmapWrapper = AnimatedBitmap.new(@hatFilename, 0) if pbResolveBitmap(@hatFilename)
|
||||
pokemon_bitmap = @original_pokemon_bitmap.bitmap.clone
|
||||
pokemon_bitmap.blt(@x_pos, @y_pos, hatBitmapWrapper.bitmap, hatBitmapWrapper.bitmap.rect) if hatBitmapWrapper
|
||||
pokemon_bitmap.blt(@x_pos, @y_pos, @hatBitmapWrapper.bitmap, @hatBitmapWrapper.bitmap.rect) if @hatBitmapWrapper
|
||||
return pokemon_bitmap
|
||||
end
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class ClothesShopPresenter < PokemonMartScreen
|
||||
|
||||
def dyeClothes()
|
||||
original_color = $Trainer.clothes_color
|
||||
options = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"]
|
||||
options = [_INTL("Shift up"), _INTL("Shift down"), _INTL("Reset"), _INTL("Confirm"), _INTL("Never Mind")]
|
||||
previous_input = 0
|
||||
ret = false
|
||||
while (true)
|
||||
@@ -50,13 +50,13 @@ class ClothesShopPresenter < PokemonMartScreen
|
||||
|
||||
# returns true if should stay in the menu
|
||||
def playerClothesActionsMenu(item)
|
||||
cmd_wear = "Wear"
|
||||
cmd_dye = "Dye Kit"
|
||||
cmd_wear = _INTL("Wear")
|
||||
cmd_dye = _INTL("Dye Kit")
|
||||
options = []
|
||||
options << cmd_wear
|
||||
options << cmd_dye if $PokemonBag.pbHasItem?(:CLOTHESDYEKIT)
|
||||
options << "Cancel"
|
||||
choice = pbMessage("What would you like to do?", options, -1)
|
||||
options << _INTL("Cancel")
|
||||
choice = pbMessage(_INTL("What would you like to do?"), options, -1)
|
||||
|
||||
if options[choice] == cmd_wear
|
||||
putOnClothes(item,false)
|
||||
@@ -77,11 +77,11 @@ class ClothesShopPresenter < PokemonMartScreen
|
||||
boolean_changes_detected = @adapter.player_changed_clothes?
|
||||
return true if !boolean_changes_detected
|
||||
pbPlayCancelSE
|
||||
cmd_confirm = "Set outfit"
|
||||
cmd_discard = "Discard changes"
|
||||
cmd_cancel = "Cancel"
|
||||
cmd_confirm = _INTL("Set outfit")
|
||||
cmd_discard = _INTL("Discard changes")
|
||||
cmd_cancel = _INTL("Cancel")
|
||||
options = [cmd_discard,cmd_confirm,cmd_cancel]
|
||||
choice = pbMessage("You have unsaved changes!",options,3)
|
||||
choice = pbMessage(_INTL("You have unsaved changes!"),options,3)
|
||||
case options[choice]
|
||||
when cmd_confirm
|
||||
@adapter.putOnSelectedOutfit
|
||||
|
||||
@@ -81,7 +81,7 @@ class ClothesShopPresenter < PokemonMartScreen
|
||||
|
||||
def dyeOptions(secondary_hat=false,item)
|
||||
original_color = secondary_hat ? $Trainer.hat2_color : $Trainer.hat_color
|
||||
options = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"]
|
||||
options = [_INTL("Shift up"), _INTL("Shift down"), _INTL("Reset"), _INTL("Confirm"), _INTL("Never Mind")]
|
||||
previous_input = 0
|
||||
while (true)
|
||||
choice = pbShowCommands(nil, options, options.length, previous_input,200)
|
||||
@@ -125,14 +125,14 @@ class ClothesShopPresenter < PokemonMartScreen
|
||||
end
|
||||
|
||||
def playerHatActionsMenu(item)
|
||||
cmd_confirm = "Confirm"
|
||||
cmd_remove = "Remove hat"
|
||||
cmd_cancel = "Cancel"
|
||||
cmd_dye = "Dye Kit"
|
||||
cmd_swap = "Swap hat positions"
|
||||
cmd_confirm = _INTL("Confirm")
|
||||
cmd_remove = _INTL("Remove hat")
|
||||
cmd_cancel = _INTL("Cancel")
|
||||
cmd_dye = _INTL("Dye Kit")
|
||||
cmd_swap = _INTL("Swap hat positions")
|
||||
|
||||
options = build_options_menu(item,cmd_confirm,cmd_remove,cmd_dye,cmd_swap,cmd_cancel)
|
||||
choice = pbMessage("What would you like to do?", options, -1,nil,0)
|
||||
choice = pbMessage(_INTL("What would you like to do?"), options, -1,nil,0)
|
||||
if options[choice] == cmd_remove
|
||||
removeHat(item)
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user