コード例 #1
0
 public void Link()
 {
     if (linked)
     {
         return;
     }
     list    = GetNode <Control>("List/Character/Margin/List");
     comment = GetNode <Label>("List/Comment/Label");
     cancel  = GetNode <Button>("List/Cancel/Button");
     cancel.Connect("pressed", this, nameof(on_Cancel));
     linked = true;
 }
コード例 #2
0
 public void Setup(IEnumerable <CharacterEntity> list)
 {
     Link();
     this.list.QueueFreeChildren();
     if (list != null)
     {
         foreach (CharacterEntity entity in list)
         {
             Button button = Visual.Icons.CharacterIcon.CreateButton(entity);
             button.Connect("pressed", this, nameof(on_Selected), Global.ArrayFrom(entity));
             this.list.AddChild(button);
         }
     }
 }
コード例 #3
0
ファイル: QuestPanel.cs プロジェクト: Swynfel/heirloom
 private void Refresh()
 {
     if (!Visible)
     {
         return;
     }
     questList.QueueFreeChildren();
     foreach (Quest quest in Game.data.quests)
     {
         Button b = new Button();
         b.Text = quest?.name ?? "";
         b.Connect("pressed", this, nameof(OpenQuest), Global.ArrayFrom(quest));
         // b.Connect("focus_entered", this, nameof(OpenQuest), Global.ArrayFrom(i));
         questList.AddChild(b);
     }
     OpenQuest(Village.quest);
 }
コード例 #4
0
 public override void _Ready()
 {
     Connect("visibility_changed", this, nameof(Refresh));
     // Quest
     questName      = GetNode <Label>("QuestBox/Quest/Name");
     partyContainer = GetNode <Control>("QuestBox/Party");
     partyList      = GetNode <Control>("QuestBox/Party/List");
     warningQuest   = GetNode <Control>("QuestBox/Quest/WarningQuest");
     warningParty   = GetNode <Control>("QuestBox/WarningParty");
     // Idle
     idleSeparator = GetNode <Control>("IdleSeparator");
     idleBox       = GetNode <Control>("IdleBox");
     idleList      = GetNode <Control>("IdleBox/Resting/List");
     // Food
     currentFood  = GetNode <Label>("Food/Center/Grid/Current");
     consumedFood = GetNode <Label>("Food/Center/Grid/Consumed");
     finalFood    = GetNode <Label>("Food/Center/Grid/Final");
     warningFood  = GetNode <Control>("Food/Warning");
     // Next Season
     nextSeasonButton = GetNode <Button>("Next/Holder/NextSeasonButton");
     nextSeasonButton.Connect("pressed", this, nameof(NextSeason));
 }
コード例 #5
0
ファイル: Outcome.cs プロジェクト: Swynfel/heirloom
        public override void _Ready()
        {
            instance         = this;
            title            = N <Label>("Title");
            head             = N <TabContainer>("Head");
            characterList    = N <Control>("Head/CharacterList/List");
            coupleLeft       = N <Visual.Tables.CharacterTable>("Head/CharacterCouple/Left");
            coupleRight      = N <Visual.Tables.CharacterTable>("Head/CharacterCouple/Right");
            boaLeft          = N <Visual.Icons.CharacterIcon>("Head/BirthOrAdoption/Left");
            boaMiddle        = N <Visual.Tables.CharacterTable>("Head/BirthOrAdoption/Middle");
            boaRight         = N <Visual.Icons.CharacterIcon>("Head/BirthOrAdoption/Right");
            questTable       = N <Visual.Tables.QuestTable>("Head/Quests/QuestTable");
            smartDescription = N <SmartText>("Description");
            buttonValidate   = N <Button>("Buttons/Validate");
            buttonNo         = N <Button>("Buttons/No");
            buttonThird      = N <Button>("Buttons/Third");
            buttonValidate.Connect("pressed", this, nameof(pressed), Global.ArrayFrom(ButtonOutcome.VALIDATE));
            buttonNo.Connect("pressed", this, nameof(pressed), Global.ArrayFrom(ButtonOutcome.NO));
            buttonThird.Connect("pressed", this, nameof(pressed), Global.ArrayFrom(ButtonOutcome.THIRD));

            Task task = OutcomeProcess.Process();
        }