Rewrote Move Reminder screen

This commit is contained in:
Maruno17
2024-11-03 01:15:53 +00:00
parent ae80d9dcd4
commit 098ca562d0
4 changed files with 392 additions and 7 deletions

View File

@@ -363,16 +363,36 @@ module UI
#---------------------------------------------------------------------------
def set_viewport_color(new_color)
@viewport.color = new_color
end
def fade_in
# TODO: pbFadeInAndShow changes the colour of all sprites. Make it instead
# change the opacity of @viewport like def pbFadeOutIn.
pbFadeInAndShow(@sprites)
duration = 0.4 # In seconds
col = Color.new(0, 0, 0, 0)
timer_start = System.uptime
loop do
col.set(0, 0, 0, lerp(255, 0, duration, timer_start, System.uptime))
set_viewport_color(col)
Graphics.update
Input.update
update_visuals
break if col.alpha == 0
end
end
def fade_out
# TODO: pbFadeOutAndHide changes the colour of all sprites. Make it
# instead change the opacity of @viewport like def pbFadeOutIn.
pbFadeOutAndHide(@sprites)
duration = 0.4 # In seconds
col = Color.new(0, 0, 0, 0)
timer_start = System.uptime
loop do
col.set(0, 0, 0, lerp(0, 255, duration, timer_start, System.uptime))
set_viewport_color(col)
Graphics.update
Input.update
update_visuals
break if col.alpha == 255
end
end
def dispose