mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Anim Editor: added filter text box to selection screen, disabled animations are listed in red
This commit is contained in:
@@ -191,6 +191,38 @@ class AnimationEditor
|
||||
return @components[:particle_list].particle_index
|
||||
end
|
||||
|
||||
def load_settings
|
||||
# TODO: Load these from a saved file.
|
||||
@settings = {
|
||||
:side_sizes => [1, 1],
|
||||
:user_index => 0,
|
||||
:target_indices => [1],
|
||||
:user_opposes => false,
|
||||
# TODO: Ideally be able to independently choose base graphics, which will
|
||||
# be a separate setting here.
|
||||
:canvas_bg => "indoor1",
|
||||
# NOTE: These sprite names are also used in Pokemon.play_cry and so should
|
||||
# be a species ID (being a string is fine).
|
||||
:user_sprite_name => "ARCANINE",
|
||||
:target_sprite_name => "CHARIZARD"
|
||||
}
|
||||
end
|
||||
|
||||
def save
|
||||
GameData::Animation.register(@anim, @anim_id)
|
||||
Compiler.write_battle_animation_file(@anim[:pbs_path])
|
||||
if @anim[:pbs_path] != @pbs_path
|
||||
if GameData::Animation::DATA.any? { |_key, anim| anim.pbs_path == @pbs_path }
|
||||
Compiler.write_battle_animation_file(@pbs_path)
|
||||
elsif FileTest.exist?("PBS/Animations/" + @pbs_path + ".txt")
|
||||
File.delete("PBS/Animations/" + @pbs_path + ".txt")
|
||||
end
|
||||
@pbs_path = @anim[:pbs_path]
|
||||
end
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Returns the animation's name for display in the menu bar and elsewhere.
|
||||
@@ -474,38 +506,6 @@ class AnimationEditor
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def load_settings
|
||||
# TODO: Load these from a saved file.
|
||||
@settings = {
|
||||
:side_sizes => [1, 1],
|
||||
:user_index => 0,
|
||||
:target_indices => [1],
|
||||
:user_opposes => false,
|
||||
# TODO: Ideally be able to independently choose base graphics, which will
|
||||
# be a separate setting here.
|
||||
:canvas_bg => "indoor1",
|
||||
# NOTE: These sprite names are also used in Pokemon.play_cry and so should
|
||||
# be a species ID (being a string is fine).
|
||||
:user_sprite_name => "ARCANINE",
|
||||
:target_sprite_name => "CHARIZARD"
|
||||
}
|
||||
end
|
||||
|
||||
def save
|
||||
GameData::Animation.register(@anim, @anim_id)
|
||||
Compiler.write_battle_animation_file(@anim[:pbs_path])
|
||||
if @anim[:pbs_path] != @pbs_path
|
||||
if GameData::Animation::DATA.any? { |_key, anim| anim.pbs_path == @pbs_path }
|
||||
Compiler.write_battle_animation_file(@pbs_path)
|
||||
elsif FileTest.exist?("PBS/Animations/" + @pbs_path + ".txt")
|
||||
File.delete("PBS/Animations/" + @pbs_path + ".txt")
|
||||
end
|
||||
@pbs_path = @anim[:pbs_path]
|
||||
end
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def draw_editor_background
|
||||
# Fill the whole screen with white
|
||||
@screen_bitmap.bitmap.fill_rect(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, Color.white)
|
||||
|
||||
Reference in New Issue
Block a user