コード例 #1
0
        private void CustomInitialize()
        {
            if (GuiManager.Windows.Contains(EntireButton) == false)
            {
                var message =
                    "Components in Entities should be added to GuiManager. See the EntireButton code in this entity's generated code for hints as to what is going on.";

                throw new Exception(message);
            }

            if (GuiManager.Windows.Contains(ButtonBackground))
            {
                throw new Exception("Only components should be clickable and added to the GuiManager");
            }

            var textObject = EntireButton.GetTextRuntime();

            var wrapper = this.gumAttachmentWrappers.First(item =>
                                                           item.GumObject == GumButtonOnFrbSprite);

            GumButtonOnFrbSprite.WidthUnits = Gum.DataTypes.DimensionUnitType.RelativeToContainer;
            GumButtonOnFrbSprite.Width      = 0;

            wrapper.FrbObject = this.SpriteWidth100;

            TestAttachToContainerFalse();

            SetupCenteredOnSpriteGumInstance();
        }
コード例 #2
0
        private void CustomInitialize()
        {
            if (GuiManager.Windows.Contains(EntireButton) == false)
            {
                throw new Exception("Components in Entities should be added to GuiManager");
            }

            if (GuiManager.Windows.Contains(ButtonBackground))
            {
                throw new Exception("Only components should be clickable and added to the GuiManager");
            }

            var textObject = EntireButton.GetTextRuntime();
        }