mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Double hats menu
This commit is contained in:
Binary file not shown.
@@ -207,7 +207,7 @@ def pbPositionFaceWindow(facewindow,msgwindow)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbPositionNearMsgWindow(cmdwindow,msgwindow,side)
|
def pbPositionNearMsgWindow(cmdwindow,msgwindow,side, x_offset=nil,y_offset=nil)
|
||||||
return if !cmdwindow
|
return if !cmdwindow
|
||||||
if msgwindow
|
if msgwindow
|
||||||
height=[cmdwindow.height,Graphics.height-msgwindow.height].min
|
height=[cmdwindow.height,Graphics.height-msgwindow.height].min
|
||||||
@@ -234,6 +234,10 @@ def pbPositionNearMsgWindow(cmdwindow,msgwindow,side)
|
|||||||
cmdwindow.x=0
|
cmdwindow.x=0
|
||||||
cmdwindow.y=0
|
cmdwindow.y=0
|
||||||
end
|
end
|
||||||
|
cmdwindow.x+= x_offset if x_offset
|
||||||
|
cmdwindow.y+= y_offset if y_offset
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# internal function
|
# internal function
|
||||||
|
|||||||
@@ -909,7 +909,7 @@ def pbMessageChooseNumber(message, params, &block)
|
|||||||
end
|
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
|
return 0 if !commands
|
||||||
$PokemonTemp.speechbubble_arrow.visible =false if $PokemonTemp.speechbubble_arrow && !$PokemonTemp.speechbubble_arrow.disposed?
|
$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)
|
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.z = 99999
|
||||||
cmdwindow.visible = true
|
cmdwindow.visible = true
|
||||||
cmdwindow.resizeToFit(cmdwindow.commands)
|
cmdwindow.resizeToFit(cmdwindow.commands)
|
||||||
pbPositionNearMsgWindow(cmdwindow, msgwindow, :right)
|
pbPositionNearMsgWindow(cmdwindow, msgwindow, :right, x_offset, y_offset)
|
||||||
cmdwindow.index = defaultCmd
|
cmdwindow.index = defaultCmd
|
||||||
command = 0
|
command = 0
|
||||||
loop do
|
loop do
|
||||||
|
|||||||
@@ -195,11 +195,6 @@ class Player < Trainer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def clothes_color=(value)
|
def clothes_color=(value)
|
||||||
echoln value
|
|
||||||
echoln @clothes
|
|
||||||
#echoln $Trainer.dyed_clothes
|
|
||||||
echoln caller
|
|
||||||
|
|
||||||
@clothes_color=value
|
@clothes_color=value
|
||||||
$Trainer.dyed_clothes= {} if !$Trainer.dyed_clothes
|
$Trainer.dyed_clothes= {} if !$Trainer.dyed_clothes
|
||||||
$Trainer.dyed_clothes[@clothes] = value if value
|
$Trainer.dyed_clothes[@clothes] = value if value
|
||||||
|
|||||||
@@ -66,9 +66,15 @@ def setHairColor(hue_shift)
|
|||||||
refreshPlayerOutfit()
|
refreshPlayerOutfit()
|
||||||
end
|
end
|
||||||
|
|
||||||
def shiftHatColor(incr)
|
def shiftHatColor(incr,secondary_hat=false)
|
||||||
$Trainer.hat_color = 0 if !$Trainer.hat_color
|
if secondary_hat
|
||||||
$Trainer.hat_color += incr
|
$Trainer.hat2_color = 0 if !$Trainer.hat2_color
|
||||||
|
$Trainer.hat2_color += incr
|
||||||
|
else
|
||||||
|
$Trainer.hat_color = 0 if !$Trainer.hat_color
|
||||||
|
$Trainer.hat_color += incr
|
||||||
|
end
|
||||||
|
|
||||||
refreshPlayerOutfit()
|
refreshPlayerOutfit()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -144,6 +150,7 @@ def generate_front_trainer_sprite_bitmap(allowEasterEgg=true, pokeball = nil,
|
|||||||
clothes_id = nil, hat_id = nil, hat2_id=nil, hair_id = nil,
|
clothes_id = nil, hat_id = nil, hat2_id=nil, hair_id = nil,
|
||||||
skin_tone_id = nil, hair_color = nil, hat_color = nil, clothes_color = nil,
|
skin_tone_id = nil, hair_color = nil, hat_color = nil, clothes_color = nil,
|
||||||
hat2_color = nil)
|
hat2_color = nil)
|
||||||
|
|
||||||
clothes_id = $Trainer.clothes if !clothes_id
|
clothes_id = $Trainer.clothes if !clothes_id
|
||||||
hat_id = $Trainer.hat if !hat_id
|
hat_id = $Trainer.hat if !hat_id
|
||||||
hat2_id = $Trainer.hat2 if !hat2_id
|
hat2_id = $Trainer.hat2 if !hat2_id
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ def selectHairColor
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def selectHatColor
|
def selectHatColor(secondary_hat=false)
|
||||||
original_color = $Trainer.hat_color
|
original_color = secondary_hat ? $Trainer.hat2_color : $Trainer.hat_color
|
||||||
display_outfit_preview()
|
display_outfit_preview()
|
||||||
commands = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"]
|
commands = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"]
|
||||||
previous_input = 0
|
previous_input = 0
|
||||||
@@ -126,24 +126,26 @@ def selectHatColor
|
|||||||
case choice
|
case choice
|
||||||
when 0 #NEXT
|
when 0 #NEXT
|
||||||
pbSEPlay("GUI storage pick up", 80, 100)
|
pbSEPlay("GUI storage pick up", 80, 100)
|
||||||
shiftHatColor(10)
|
shiftHatColor(10,secondary_hat)
|
||||||
display_outfit_preview()
|
display_outfit_preview
|
||||||
ret = true
|
ret = true
|
||||||
when 1 #PREVIOUS
|
when 1 #PREVIOUS
|
||||||
pbSEPlay("GUI storage pick up", 80, 100)
|
pbSEPlay("GUI storage pick up", 80, 100)
|
||||||
shiftHatColor(-10)
|
shiftHatColor(-10,secondary_hat)
|
||||||
display_outfit_preview()
|
display_outfit_preview
|
||||||
ret = true
|
ret = true
|
||||||
when 2 #Reset
|
when 2 #Reset
|
||||||
pbSEPlay("GUI storage put down", 80, 100)
|
pbSEPlay("GUI storage put down", 80, 100)
|
||||||
$Trainer.hat_color = 0
|
$Trainer.hat_color = 0 if !secondary_hat
|
||||||
display_outfit_preview()
|
$Trainer.hat2_color = 0 if secondary_hat
|
||||||
refreshPlayerOutfit()
|
display_outfit_preview
|
||||||
|
refreshPlayerOutfit
|
||||||
ret = false
|
ret = false
|
||||||
when 3 #Confirm
|
when 3 #Confirm
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
$Trainer.hat_color = original_color
|
$Trainer.hat_color = original_color if !secondary_hat
|
||||||
|
$Trainer.hat2_color = original_color if secondary_hat
|
||||||
ret = false
|
ret = false
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class TrainerClothesPreview
|
class TrainerClothesPreview
|
||||||
attr_writer :pokeball, :clothes, :hat, :hat2, :hair, :skin_tone, :hair_color, :hat_color, :clothes_color
|
attr_writer :pokeball, :clothes, :hat, :hat2, :hair, :skin_tone, :hair_color, :hat_color,:hat2_color, :clothes_color
|
||||||
|
|
||||||
def initialize(x = 0, y = 0, windowed = true, pokeball = nil)
|
def initialize(x = 0, y = 0, windowed = true, pokeball = nil)
|
||||||
@playerBitmap = nil
|
@playerBitmap = nil
|
||||||
|
|||||||
@@ -76,9 +76,11 @@ def putOnHat(outfit_id, silent = false, is_secondary=false)
|
|||||||
|
|
||||||
dye_color = $Trainer.dyed_hats[outfit_id]
|
dye_color = $Trainer.dyed_hats[outfit_id]
|
||||||
if dye_color
|
if dye_color
|
||||||
$Trainer.hat_color = dye_color
|
$Trainer.hat_color = dye_color if !is_secondary
|
||||||
|
$Trainer.hat2_color = dye_color if is_secondary
|
||||||
else
|
else
|
||||||
$Trainer.hat_color = nil
|
$Trainer.hat_color = nil if !is_secondary
|
||||||
|
$Trainer.hat2_color = nil if is_secondary
|
||||||
end
|
end
|
||||||
|
|
||||||
$game_map.refreshPlayerOutfit()
|
$game_map.refreshPlayerOutfit()
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.5 KiB |
Reference in New Issue
Block a user