示例#1
0
        public void Init()
        {
            _tooltipLabel = new Label
            {
                Transform           = new Transform2(new Vector2(1270, 124), new Size2(500, 60)),
                BackgroundColor     = Color.Transparent,
                HorizontalAlignment = HorizontalAlignment.Right,
                TextColor           = UiStyle.TextLightPurple
            };

            _confirmationVisuals = new List <IVisual>();
            _confirmationBranch  = new ClickUIBranch("Confirm", 3);
            AddConfirmationButton(UiButtons.MenuRed("Quit", new Vector2(960 - 360 - 100, 500), Confirm));
            AddConfirmationButton(UiButtons.MenuRed("Cancel", new Vector2(960 + 0 + 100, 500), Cancel));
            _confirmationBranch.Add(new ScreenClickable(() => { }));

            _clickables = new List <VisualClickableUIElement>();
            AddIconButton(() => Scene.NavigateTo(GameResources.DilemmasSceneName), "Icons/Dilemmas", "Dilemmas");
            AddIconButton(() => Scene.NavigateTo(GameResources.DialogueMemoriesScene), "Icons/Conversations", "Conversations");
            AddIconButton(() => Scene.NavigateTo(GameResources.OptionsSceneName), "Icons/Options", "Options");
            AddIconButton(() => Scene.NavigateTo(GameResources.SaveLoadSceneName), "Icons/Save", "Save / Load");
            AddIconButton(OpenConfirmationMenu, "Icons/ExitToMenu", "Main Menu");
            HudBranch = new ClickUIBranch("HUD", 2);
            _clickables.ForEach(x => HudBranch.Add(x));
            _newIcon = new ImageBox
            {
                Transform = new Transform2(new Size2(43, 43)),
                Image     = "UI/NewRedIconBorderless"
            };

            Event.SubscribeForever(EventSubscription.Create <ActiveElementChanged>(UpdateTooltip, this));
        }
示例#2
0
        protected override void OnInit()
        {
            Audio.PlayMusic("Pondering", 0.78f);
            _header = UiLabels.FullWidthHeaderLabel("Current Investigation", Color.White);

            Add(UiButtons.Back(() => Scene.NavigateTo(CurrentGameState.CurrentLocation)));
            if (GameObjects.Dilemmas.HasTheory)
            {
                Add(UiButtons.MenuRed("Resolve", new Vector2(UI.OfScreenWidth(0.5f) - 180, 980), () => Scene.NavigateTo(GameResources.EndingSceneName)));
            }

            GameObjects.Dilemmas.GetActiveDilemmas().ForEach(d =>
            {
                Add(d.CreateButton());
                d.GetVisuals().ForEach(AddVisual);
            });
            Add(new DilemmasTutorial());
        }