Ejemplo n.º 1
0
        public static void MakeButtonAt( LauncherWindow game, LauncherWidget[] widgets, ref int widgetIndex,
            string text, int width, int height, Font font, Anchor horAnchor,
            Anchor verAnchor, int x, int y, Action<int, int> onClick)
        {
            LauncherButtonWidget widget;
            if( widgets[widgetIndex] != null ) {
                widget = (LauncherButtonWidget)widgets[widgetIndex];
            } else {
                widget = new LauncherButtonWidget( game );
                widget.Text = text;
                widget.OnClick = onClick;
                widgets[widgetIndex] = widget;
            }

            widget.Active = false;
            widget.SetDrawData( game.Drawer, text, font, horAnchor, verAnchor, width, height, x, y );
            widgetIndex++;
        }
Ejemplo n.º 2
0
        public static void MakeButtonAt(LauncherWindow game, LauncherWidget[] widgets, ref int widgetIndex,
                                        string text, int width, int height, Font font, Anchor horAnchor,
                                        Anchor verAnchor, int x, int y, Action <int, int> onClick)
        {
            LauncherButtonWidget widget;

            if (widgets[widgetIndex] != null)
            {
                widget = (LauncherButtonWidget)widgets[widgetIndex];
            }
            else
            {
                widget               = new LauncherButtonWidget(game);
                widget.Text          = text;
                widget.OnClick       = onClick;
                widgets[widgetIndex] = widget;
            }

            widget.Active = false;
            widget.SetDrawData(game.Drawer, text, font, horAnchor, verAnchor, width, height, x, y);
            widgetIndex++;
        }