mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Implemented redesign of summary screen
This commit is contained in:
@@ -95,7 +95,7 @@ GameData::Stat.register({
|
|||||||
GameData::Stat.register({
|
GameData::Stat.register({
|
||||||
:id => :SPECIAL_ATTACK,
|
:id => :SPECIAL_ATTACK,
|
||||||
:name => _INTL("Special Attack"),
|
:name => _INTL("Special Attack"),
|
||||||
:name_semi_brief => _INTL("Sp. Atk"),
|
:name_semi_brief => _INTL("Sp. Attack"),
|
||||||
:name_brief => _INTL("SpAtk"),
|
:name_brief => _INTL("SpAtk"),
|
||||||
:type => :main_battle,
|
:type => :main_battle,
|
||||||
:pbs_order => 4
|
:pbs_order => 4
|
||||||
@@ -104,7 +104,7 @@ GameData::Stat.register({
|
|||||||
GameData::Stat.register({
|
GameData::Stat.register({
|
||||||
:id => :SPECIAL_DEFENSE,
|
:id => :SPECIAL_DEFENSE,
|
||||||
:name => _INTL("Special Defense"),
|
:name => _INTL("Special Defense"),
|
||||||
:name_semi_brief => _INTL("Sp. Def"),
|
:name_semi_brief => _INTL("Sp. Defense"),
|
||||||
:name_brief => _INTL("SpDef"),
|
:name_brief => _INTL("SpDef"),
|
||||||
:type => :main_battle,
|
:type => :main_battle,
|
||||||
:pbs_order => 5
|
:pbs_order => 5
|
||||||
|
|||||||
@@ -1254,7 +1254,7 @@ class PokemonStorageScene
|
|||||||
pbPartySetArrow(@sprites["arrow"], @selection)
|
pbPartySetArrow(@sprites["arrow"], @selection)
|
||||||
pbUpdateOverlay(@selection, @storage.party)
|
pbUpdateOverlay(@selection, @storage.party)
|
||||||
else
|
else
|
||||||
screen = UI::PokemonSummary.new(@storage.boxes[selected[0]], selected[1])
|
screen = UI::PokemonSummary.new(@storage.boxes[selected[0]].pokemon, selected[1])
|
||||||
@selection = screen.result
|
@selection = screen.result
|
||||||
pbSetArrow(@sprites["arrow"], @selection)
|
pbSetArrow(@sprites["arrow"], @selection)
|
||||||
pbUpdateOverlay(@selection)
|
pbUpdateOverlay(@selection)
|
||||||
|
|||||||
@@ -263,6 +263,24 @@ module UI
|
|||||||
@sprites[overlay].draw_image(filename, image_x, image_y, src_x, src_y, src_width, src_height)
|
@sprites[overlay].draw_image(filename, image_x, image_y, src_x, src_y, src_width, src_height)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# The image is assumed to be the digits 0-9 and then a "/", all the same
|
||||||
|
# width, in a horizontal row.
|
||||||
|
def draw_number_from_image(bitmap, string, text_x, text_y, align: :left, overlay: :overlay)
|
||||||
|
string = string.to_s
|
||||||
|
raise _INTL("Can't draw {1} as a number.", string) if !string.scan(/[^\d\/]/).empty?
|
||||||
|
char_width = bitmap.width / 11
|
||||||
|
char_height = bitmap.height
|
||||||
|
chars = string.split(//)
|
||||||
|
chars.reverse! if align == :right
|
||||||
|
chars.length.times do |i|
|
||||||
|
char = chars[i]
|
||||||
|
index = (char == "/") ? 10 : char.to_i
|
||||||
|
char_x = (align == :right) ? text_x - ((i + 1) * char_width) : text_x + (i * char_width)
|
||||||
|
draw_image(bitmap, char_x, text_y,
|
||||||
|
index * char_width, 0, char_width, char_height, overlay: overlay)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
# Redraw everything on the screen.
|
# Redraw everything on the screen.
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user