Commit 2d60bef4 authored by AndreiLisita's avatar AndreiLisita 🎮 Committed by Alexander Mikhaylenko

display-box: Flash the screen when creating a new savestate

The flash effect is used as feedback for creating savestates either via the
shortcut or by using the new savestate row in the menu.
parent 2752c952
Pipeline #105026 passed with stages
in 15 minutes and 34 seconds
......@@ -33,6 +33,11 @@
<property name="hexpand">True</property>
</object>
</child>
<child type="overlay">
<object class="GamesFlashBox" id="flash_box">
<property name="visible">True</property>
</object>
</child>
<child type="overlay">
<object class="GamesSavestatesList" id="savestates_list">
<property name="visible">True</property>
......
......@@ -34,6 +34,9 @@ private class Games.DisplayBox : Gtk.Bin {
public Runner runner {
get { return _runner; }
set {
if (runner != null)
runner.new_savestate_created.disconnect (flash_box.flash);
stack.visible_child = display_overlay;
_runner = value;
......@@ -47,6 +50,8 @@ private class Games.DisplayBox : Gtk.Bin {
set_display (display);
savestates_list.runner = value;
runner.new_savestate_created.connect (flash_box.flash);
}
}
......@@ -63,6 +68,8 @@ private class Games.DisplayBox : Gtk.Bin {
[GtkChild]
private DisplayHeaderBar fullscreen_header_bar;
[GtkChild]
private FlashBox flash_box;
[GtkChild]
private SavestatesList savestates_list;
private Binding fullscreen_binding;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment