コード例 #1
0
ファイル: MainClass.cs プロジェクト: mit4web/DynamicChecklist
        private void GameLoadedEvent(object sender, EventArgs e)
        {
            this.graph = new CompleteGraph(Game1.locations);
            this.graph.Populate();
            this.InitializeObjectLists();
            ChecklistMenu.ObjectLists = this.objectLists;
            Func <int> crt = this.CountRemainingTasks;

            this.checklistButton = new OpenChecklistButton(() => ChecklistMenu.Open(this.config), crt, this.config);
            Game1.onScreenMenus.Insert(0, this.checklistButton); // So that click is registered with priority
            this.doneLoading = true;
        }
コード例 #2
0
ファイル: MainClass.cs プロジェクト: mit4web/DynamicChecklist
 private void ReceiveKeyPress(object sender, EventArgsKeyPressed e)
 {
     if (e.KeyPressed.ToString() == this.config.OpenMenuKey)
     {
         if (Game1.activeClickableMenu is ChecklistMenu)
         {
             Game1.activeClickableMenu = null;
             Game1.playSound("bigDeSelect");
         }
         else
         {
             if (this.MenuAllowed())
             {
                 ChecklistMenu.Open(this.config);
             }
         }
     }
 }
コード例 #3
0
 private void Input_ButtonPressed(object sender, ButtonPressedEventArgs e)
 {
     if (e.Button.ToString() == this.config.OpenMenuKey)
     {
         if (Game1.activeClickableMenu is ChecklistMenu)
         {
             Game1.activeClickableMenu = null;
             Game1.playSound("bigDeSelect");
         }
         else
         {
             if (this.MenuAllowed())
             {
                 ChecklistMenu.Open(this.config);
             }
         }
     }
 }