Beispiel #1
0
 public void HandleMenu()
 {
     if (Game1.hasLoadedGame && Game1.activeClickableMenu == null)
     {
         Game1.activeClickableMenu = new NPCMenu();
         NPCMenu menu = (NPCMenu)Game1.activeClickableMenu;
         menu.initializeUpperRightCloseButton();
         menu.invisible = false;
         showNPC        = true;
     }
     else if (showNPC)
     {
         Game1.activeClickableMenu = null;
         showNPC = false;
     }
 }
 public void init(InitializeEvent @event)
 {
     locs    = new NPCMenu(@event.Root);
     NConfig = new NPCLocationConfig();
     NConfig = (NPCLocationConfig)Config.InitializeConfig(Config.GetBasePath(this), NConfig);
     if (Enum.IsDefined(typeof(Keys), NConfig.KeyboardKey.ToUpper()))
     {
         openKey = (Keys)Enum.Parse(typeof(Keys), NConfig.KeyboardKey.ToUpper());
     }
     else
     {
         openKey = Keys.Z;
     }
     if (Enum.IsDefined(typeof(Buttons), NConfig.ButtonKey))
     {
         openButton = (Buttons)Enum.Parse(typeof(Buttons), NConfig.ButtonKey);
     }
     else
     {
         openButton = Buttons.LeftShoulder;
     }
 }