Пример #1
0
            public GrinderMenu(ReagentGrinderBoundUserInterface owner)
            {
                SetSize = MinSize = (512, 256);
                Owner   = owner;
                Title   = Loc.GetString("All-In-One Grinder 3000");

                var hSplit = new HBoxContainer();

                var vBoxGrindJuiceButtonPanel = new VBoxContainer
                {
                    VerticalAlignment = VAlignment.Center
                };

                GrindButton = new Button
                {
                    Text      = Loc.GetString("Grind"),
                    TextAlign = Label.AlignMode.Center,
                    MinSize   = (64, 64)
                };

                JuiceButton = new Button
                {
                    Text      = Loc.GetString("Juice"),
                    TextAlign = Label.AlignMode.Center,
                    MinSize   = (64, 64)
                };

                vBoxGrindJuiceButtonPanel.AddChild(GrindButton);
                //inner button padding
                vBoxGrindJuiceButtonPanel.AddChild(new Control
                {
                    MinSize = (0, 16),
                });
            public GrinderMenu(ReagentGrinderBoundUserInterface owner)
            {
                SetSize = MinSize = (512, 256);
                Owner   = owner;
                Title   = Loc.GetString("grinder-menu-title");

                var hSplit = new BoxContainer
                {
                    Orientation = LayoutOrientation.Horizontal
                };

                var vBoxGrindJuiceButtonPanel = new BoxContainer
                {
                    Orientation       = LayoutOrientation.Vertical,
                    VerticalAlignment = VAlignment.Center
                };

                GrindButton = new Button
                {
                    Text      = Loc.GetString("grinder-menu-grind-button"),
                    TextAlign = Label.AlignMode.Center,
                    MinSize   = (64, 64)
                };

                JuiceButton = new Button
                {
                    Text      = Loc.GetString("grinder-menu-juice-button"),
                    TextAlign = Label.AlignMode.Center,
                    MinSize   = (64, 64)
                };

                vBoxGrindJuiceButtonPanel.AddChild(GrindButton);
                //inner button padding
                vBoxGrindJuiceButtonPanel.AddChild(new Control
                {
                    MinSize = (0, 16),
                });
            public GrinderMenu(ReagentGrinderBoundUserInterface owner = null)
            {
                Owner = owner;
                Title = Loc.GetString("All-In-One Grinder 3000");

                var hSplit = new HBoxContainer
                {
                    SizeFlagsHorizontal = SizeFlags.Fill,
                    SizeFlagsVertical   = SizeFlags.Fill
                };

                var vBoxGrindJuiceButtonPanel = new VBoxContainer
                {
                    SizeFlagsVertical = SizeFlags.ShrinkCenter
                };

                GrindButton = new Button
                {
                    Text              = Loc.GetString("Grind"),
                    TextAlign         = Label.AlignMode.Center,
                    CustomMinimumSize = (64, 64)
                };

                JuiceButton = new Button
                {
                    Text              = Loc.GetString("Juice"),
                    TextAlign         = Label.AlignMode.Center,
                    CustomMinimumSize = (64, 64)
                };

                vBoxGrindJuiceButtonPanel.AddChild(GrindButton);
                //inner button padding
                vBoxGrindJuiceButtonPanel.AddChild(new Control
                {
                    CustomMinimumSize = (0, 16),
                });