Anim Editor: added dark colour scheme

This commit is contained in:
Maruno17
2024-05-13 20:32:20 +01:00
parent 5495bf565c
commit 63309a2ae9
19 changed files with 526 additions and 236 deletions

View File

@@ -19,6 +19,8 @@ class AnimationEditor::Canvas < Sprite
FRAME_SIZE = 48
PARTICLE_FRAME_COLOR = Color.new(0, 0, 0, 64)
include UIControls::StyleMixin
def initialize(viewport, anim, settings)
super(viewport)
@anim = anim
@@ -156,6 +158,14 @@ class AnimationEditor::Canvas < Sprite
return true
end
def color_scheme=(value)
return if @color_scheme == value
@color_scheme = value
self.bitmap.font.color = text_color
self.bitmap.font.size = text_size
refresh
end
def selected_particle=(val)
return if @selected_particle == val
@selected_particle = val
@@ -543,8 +553,7 @@ class AnimationEditor::Canvas < Sprite
def refresh_particle_frame
return if !show_particle_sprite?(@selected_particle)
focus = @anim[:particles][@selected_particle][:focus]
frame_color = AnimationEditor::ParticleList::CONTROL_BG_COLORS[focus] || Color.magenta
frame_color = focus_color(@anim[:particles][@selected_particle][:focus])
@sel_frame_bitmap.outline_rect(1, 1, @sel_frame_bitmap.width - 2, @sel_frame_bitmap.height - 2, frame_color)
update_selected_particle_frame
end