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

            widget.SetDrawData( game.Drawer, horAnchor, verAnchor, x, y );
            widgetIndex++;
        }
Ejemplo n.º 2
0
        public static void MakeBooleanAt(LauncherWindow game, LauncherWidget[] widgets, ref int widgetIndex,
                                         Anchor horAnchor, Anchor verAnchor, Font font, bool initValue,
                                         int width, int height, int x, int y, Action <int, int> onClick)
        {
            LauncherBoolWidget widget;

            if (widgets[widgetIndex] != null)
            {
                widget = (LauncherBoolWidget)widgets[widgetIndex];
            }
            else
            {
                widget               = new LauncherBoolWidget(game, font, width, height);
                widget.Value         = initValue;
                widget.OnClick       = onClick;
                widgets[widgetIndex] = widget;
            }

            widget.SetDrawData(game.Drawer, horAnchor, verAnchor, x, y);
            widgetIndex++;
        }