mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Rewrote Move Reminder screen
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user