[gnome-nibbles/arnaudb/use-uint8: 2/9] Privatize some classes to NibblesView.



commit 178b6d7ff1edb045d24436c0107734166dce0517
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Jul 2 16:47:04 2020 +0200

    Privatize some classes to NibblesView.

 src/nibbles-view.vala | 146 +++++++++++++++++++++++++-------------------------
 1 file changed, 73 insertions(+), 73 deletions(-)
---
diff --git a/src/nibbles-view.vala b/src/nibbles-view.vala
index 6dc61d8..7074a8e 100644
--- a/src/nibbles-view.vala
+++ b/src/nibbles-view.vala
@@ -16,100 +16,100 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-private class WormActor : Clutter.Actor
+private class NibblesView : GtkClutter.Embed
 {
-    protected override void show ()
+    private class WormActor : Clutter.Actor
     {
-        base.show ();
+        protected override void show ()
+        {
+            base.show ();
 
-        set_opacity (0);
-        set_scale (3.0, 3.0);
+            set_opacity (0);
+            set_scale (3.0, 3.0);
+
+            save_easing_state ();
+            set_easing_mode (Clutter.AnimationMode.EASE_OUT_CIRC);
+            set_easing_duration (GAMEDELAY * 26);
+            set_scale (1.0, 1.0);
+            set_pivot_point (0.5f, 0.5f);
+            set_opacity (0xff);
+            restore_easing_state ();
+        }
 
-        save_easing_state ();
-        set_easing_mode (Clutter.AnimationMode.EASE_OUT_CIRC);
-        set_easing_duration (NibblesView.GAMEDELAY * 26);
-        set_scale (1.0, 1.0);
-        set_pivot_point (0.5f, 0.5f);
-        set_opacity (0xff);
-        restore_easing_state ();
+        protected override void hide ()
+        {
+            save_easing_state ();
+            set_easing_mode (Clutter.AnimationMode.EASE_IN_QUAD);
+            set_easing_duration (GAMEDELAY * 15);
+            set_scale (0.4f, 0.4f);
+            set_opacity (0);
+            restore_easing_state ();
+        }
     }
 
-    protected override void hide ()
+    private class BonusTexture : GtkClutter.Texture
     {
-        save_easing_state ();
-        set_easing_mode (Clutter.AnimationMode.EASE_IN_QUAD);
-        set_easing_duration (NibblesView.GAMEDELAY * 15);
-        set_scale (0.4f, 0.4f);
-        set_opacity (0);
-        restore_easing_state ();
-    }
-}
+        private const float SIZE_MULTIPLIER = 2;
 
-private class BonusTexture : GtkClutter.Texture
-{
-    private const float SIZE_MULTIPLIER = 2;
+        protected override void show ()
+        {
+            base.show ();
 
-    protected override void show ()
-    {
-        base.show ();
+            set_opacity (0);
+            set_scale (3.0, 3.0);
 
-        set_opacity (0);
-        set_scale (3.0, 3.0);
+            save_easing_state ();
+            set_easing_mode (Clutter.AnimationMode.EASE_OUT_BOUNCE);
+            set_easing_duration (GAMEDELAY * 20);
+            set_scale (1.0, 1.0);
+            set_pivot_point (0.5f, 0.5f);
+            set_opacity (0xff);
+            restore_easing_state ();
+        }
 
-        save_easing_state ();
-        set_easing_mode (Clutter.AnimationMode.EASE_OUT_BOUNCE);
-        set_easing_duration (NibblesView.GAMEDELAY * 20);
-        set_scale (1.0, 1.0);
-        set_pivot_point (0.5f, 0.5f);
-        set_opacity (0xff);
-        restore_easing_state ();
+        internal new void set_size (float width, float height)
+        {
+            base.set_size (SIZE_MULTIPLIER * width, SIZE_MULTIPLIER * height);
+        }
     }
 
-    internal new void set_size (float width, float height)
+    private class WarpTexture: GtkClutter.Texture
     {
-        base.set_size (SIZE_MULTIPLIER * width, SIZE_MULTIPLIER * height);
-    }
-}
+        private const float SIZE_MULTIPLIER = 2;
 
-private class WarpTexture: GtkClutter.Texture
-{
-    private const float SIZE_MULTIPLIER = 2;
-
-    protected override void show ()
-    {
-        base.show ();
+        protected override void show ()
+        {
+            base.show ();
 
-        set_opacity (0);
-        set_scale (3.0, 3.0);
+            set_opacity (0);
+            set_scale (3.0, 3.0);
 
-        save_easing_state ();
-        set_easing_mode (Clutter.AnimationMode.EASE_OUT_CIRC);
-        set_easing_duration (NibblesView.GAMEDELAY * 15);
-        set_scale (1.0, 1.0);
-        set_pivot_point (0.5f, 0.5f);
-        set_opacity (0xff);
-        restore_easing_state ();
-    }
+            save_easing_state ();
+            set_easing_mode (Clutter.AnimationMode.EASE_OUT_CIRC);
+            set_easing_duration (GAMEDELAY * 15);
+            set_scale (1.0, 1.0);
+            set_pivot_point (0.5f, 0.5f);
+            set_opacity (0xff);
+            restore_easing_state ();
+        }
 
-    protected override void hide ()
-    {
-        save_easing_state ();
-        set_easing_mode (Clutter.AnimationMode.EASE_IN_QUAD);
-        set_easing_duration (NibblesView.GAMEDELAY * 15);
-        set_scale (0.4f, 0.4f);
-        set_pivot_point (0.5f, 0.5f);
-        set_opacity (0);
-        restore_easing_state ();
-    }
+        protected override void hide ()
+        {
+            save_easing_state ();
+            set_easing_mode (Clutter.AnimationMode.EASE_IN_QUAD);
+            set_easing_duration (GAMEDELAY * 15);
+            set_scale (0.4f, 0.4f);
+            set_pivot_point (0.5f, 0.5f);
+            set_opacity (0);
+            restore_easing_state ();
+        }
 
-    internal new void set_size (float width, float height)
-    {
-        base.set_size (SIZE_MULTIPLIER * width, SIZE_MULTIPLIER * height);
+        internal new void set_size (float width, float height)
+        {
+            base.set_size (SIZE_MULTIPLIER * width, SIZE_MULTIPLIER * height);
+        }
     }
-}
 
-private class NibblesView : GtkClutter.Embed
-{
     internal const int WIDTH = 92;
     internal const int HEIGHT = 66;
     internal const int GAMEDELAY = 35;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]