Exemple #1
0
        public Menu()
            : base(0, 0, 0, 0, true)
        {
            Game1.playSound("bigSelect");
            this.width  = 832;
            this.height = 576;
            if (LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.ko || LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.fr)
            {
                this.height += 64;
            }
            Vector2 centeringOnScreen = Utility.getTopLeftPositionForCenteringOnScreen(this.width, this.height, 0, 0);

            this.xPositionOnScreen     = (int)centeringOnScreen.X;
            this.yPositionOnScreen     = (int)centeringOnScreen.Y + 32;
            this.upperRightCloseButton = new ClickableTextureComponent(new Rectangle(this.xPositionOnScreen + this.width - 20, this.yPositionOnScreen - 8, 48, 48), Game1.mouseCursors, new Rectangle(337, 494, 12, 12), 4f, false);

            for (int index = 0; index < 7; ++index)
            {
                this.optionsSlots.Add(new ClickableComponent(new Rectangle(this.xPositionOnScreen + 16, this.yPositionOnScreen + 80 + 4 + index * ((height - 128) / 7), width - 32, (height - 128) / 7 + 4), string.Concat((object)index))
                {
                    myID           = index,
                    downNeighborID = index < 6 ? index + 1 : -7777,
                    upNeighborID   = index > 0 ? index - 1 : -7777,
                    fullyImmutable = true
                });
            }
            this.options.Add((new DialogueOptionsInputListener("yeet", optionsSlots[0].bounds.Width, () => shit.Yeet(true))));
            this.options.Add((new DialogueOptionsInputListener("yoot", optionsSlots[0].bounds.Width, () => shit.Yeet(false))));

            //this.options.Add((OptionsElement)new OptionsInputListener("Reload last dialogue", 1,
            //    optionsSlots[0].bounds.Width, -1, -1));
            //this.options.Add((OptionsElement)new OptionsInputListener("Load entire dialogue", 2,
            //    optionsSlots[0].bounds.Width, -1, -1));
        }