protected virtual void SetView (PhotoImageView view)
		{
			if (controls != null)
				controls.Destroy ();

			controls = null;

			this.view = view;
			if (view == null)
				return;

			Widget w = CreateControls ();

			if (w != null) {
#if false
				ControlOverlay c = new ControlOverlay (view);
				c.AutoHide = false;
				w.ShowAll ();
				c.Add (w);
				c.Visibility = ControlOverlay.VisibilityType.Full;
				controls = c;
#else
				Window win = new Window (String.Format ("{0}", GetTitle ()));
				win.TransientFor = (Gtk.Window) view.Toplevel;
				win.Add (w);
				win.ShowAll ();
				win.DeleteEvent += delegate { Destroy (); };
				controls = win;
#endif
			}
			
		}
Beispiel #2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
            public ControlLayer(IBeatmap beatmap)
            {
                InternalChildren = new Drawable[]
                {
                    triggerButtons = new FillFlowContainer <SettingButton>
                    {
                        Anchor       = Anchor.CentreRight,
                        Origin       = Anchor.CentreRight,
                        AutoSizeAxes = Axes.Both,
                        Spacing      = new Vector2(10),
                        Margin       = new MarginPadding(40),
                        Direction    = FillDirection.Vertical,
                    }
                };

                AddExtraOverlay(gameplaySettingsOverlay = new ControlOverlay(beatmap));
            }
        protected virtual void SetView(PhotoImageView view)
        {
            if (controls != null)
            {
                controls.Destroy();
            }

            controls = null;

            this.view = view;
            if (view == null)
            {
                return;
            }

            Widget w = CreateControls();

            if (w != null)
            {
#if false
                ControlOverlay c = new ControlOverlay(view);
                c.AutoHide = false;
                w.ShowAll();
                c.Add(w);
                c.Visibility = ControlOverlay.VisibilityType.Full;
                controls     = c;
#else
                Window win = new Window(String.Format("{0}", GetTitle()));
                win.TransientFor = (Gtk.Window)view.Toplevel;
                win.Add(w);
                win.ShowAll();
                win.DeleteEvent += delegate { Destroy(); };
                controls         = win;
#endif
            }
        }