mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Anim Editor: bug fixes relating to deleting particles, added some animations
This commit is contained in:
@@ -560,7 +560,7 @@ AnimationEditor::SidePanes.add_property(:particle_pane, :foe_invert_y, {
|
||||
|
||||
AnimationEditor::SidePanes.add_property(:particle_pane, :foe_flip, {
|
||||
:new => proc { |pane, editor|
|
||||
pane.add_labelled_checkbox(:foe_flip, _INTL("Flip Sprite"), false)
|
||||
pane.add_labelled_checkbox(:foe_flip, _INTL("Flip sprite"), false)
|
||||
},
|
||||
:refresh_value => proc { |control, editor|
|
||||
focus = editor.anim[:particles][editor.particle_index][:focus]
|
||||
@@ -610,6 +610,7 @@ AnimationEditor::SidePanes.add_property(:particle_pane, :delete, {
|
||||
AnimationEditor::ParticleDataHelper.delete_particle(editor.anim[:particles], p_index)
|
||||
editor.components[:particle_list].delete_particle(p_index)
|
||||
editor.components[:particle_list].set_particles(editor.anim[:particles])
|
||||
p_index = editor.particle_index
|
||||
editor.components[:particle_list].keyframe = 0 if editor.anim[:particles][p_index][:name] == "SE"
|
||||
editor.refresh
|
||||
end
|
||||
|
||||
@@ -200,7 +200,7 @@ class AnimationEditor::ParticleList < UIControls::BaseControl
|
||||
end
|
||||
|
||||
def particle_index
|
||||
return -1 if @row_index < 0
|
||||
return -1 if @row_index < 0 || @row_index >= @particle_list.length
|
||||
ret = @particle_list[@row_index]
|
||||
return (ret.is_a?(Array)) ? ret[0] : ret
|
||||
end
|
||||
@@ -335,6 +335,7 @@ class AnimationEditor::ParticleList < UIControls::BaseControl
|
||||
@particle_list.push([i, property]) if value.is_a?(Array)
|
||||
end
|
||||
end
|
||||
@row_index = @particle_list.length - 1 if @row_index >= @particle_list.length
|
||||
# Dispose of and clear all existing list/commands sprites
|
||||
dispose_listed_sprites
|
||||
# Create new sprites for each particle (1x list and 2x commands)
|
||||
|
||||
Reference in New Issue
Block a user