public override void AddRecipeGroups() { if (!Main.dedServ) { try { itemBrowser = new ItemBrowser(this); itemBrowser.SetDefaultPosition(new Vector2(80, 300)); itemBrowser.Visible = false; npcBrowser = new NPCBrowser(this); npcBrowser.SetDefaultPosition(new Vector2(30, 180)); npcBrowser.Visible = false; recipeBrowser = new RecipeBrowserWindow(this); recipeBrowser.SetDefaultPosition(new Vector2(30, 180)); recipeBrowser.Visible = false; extendedCheatMenu = new ExtendedCheatMenu(this); extendedCheatMenu.SetDefaultPosition(new Vector2(120, 180)); extendedCheatMenu.Visible = false; paintToolsHotbar = new PaintToolsHotbar(this); // paintToolsHotbar.SetDefaultPosition(new Microsoft.Xna.Framework.Vector2(120, 180)); paintToolsHotbar.Visible = false; paintToolsHotbar.Hide(); paintToolsUI = new PaintToolsUI(this); paintToolsUI.SetDefaultPosition(new Vector2(30, 180)); paintToolsUI.Visible = false; quickTeleportHotbar = new QuickTeleportHotbar(this); quickTeleportHotbar.Visible = false; quickTeleportHotbar.Hide(); quickClearHotbar = new QuickClearHotbar(this); quickClearHotbar.Visible = false; quickClearHotbar.Hide(); npcButchererHotbar = new NPCButchererHotbar(this); npcButchererHotbar.Visible = false; npcButchererHotbar.Hide(); //eventManagerHotbar = new EventManagerHotbar(this); //eventManagerHotbar.Visible = false; //eventManagerHotbar.Hide(); hotbar = new Hotbar(this); //hotbar.Position = new Microsoft.Xna.Framework.Vector2(120, 180); hotbar.Visible = true; hotbar.Hide(); } catch (Exception e) { ErrorLogger.Log(e.ToString()); } } }
public override object Call(params object[] args) { try { string message = args[0] as string; if (message == "AddButton_Test") { Logger.Info("Button Adding..."); RegisterButton(args[1] as Texture2D, args[2] as Action, args[3] as Func <string>); Logger.Info("...Button Added"); } else if (message == "HideHotbar") { hotbar.Hide(); } else { Logger.Error("Call Error: Unknown Message: " + message); } } catch (Exception e) { Logger.Error("Call Error: " + e.StackTrace + e.Message); } return(null); }
public override void AddRecipeGroups() { if (!Main.dedServ) { try { itemBrowser = new ItemBrowser(this); itemBrowser.SetDefaultPosition(new Vector2(80, 300)); itemBrowser.Visible = false; npcBrowser = new NPCBrowser(this); npcBrowser.SetDefaultPosition(new Vector2(30, 180)); npcBrowser.Visible = false; // recipeBrowser = new RecipeBrowserWindow(this); // recipeBrowser.SetDefaultPosition(new Vector2(30, 180)); // recipeBrowser.Visible = false; // extendedCheatMenu = new ExtendedCheatMenu(this); // extendedCheatMenu.SetDefaultPosition(new Vector2(120, 180)); // extendedCheatMenu.Visible = false; // paintToolsHotbar = new PaintToolsHotbar(this); // paintToolsHotbar.SetDefaultPosition(new Microsoft.Xna.Framework.Vector2(120, 180)); // paintToolsHotbar.Visible = false; // paintToolsHotbar.Hide(); // paintToolsUI = new PaintToolsUI(this); // paintToolsUI.SetDefaultPosition(new Vector2(30, 180)); // paintToolsUI.Visible = false; // quickTeleportHotbar = new QuickTeleportHotbar(this); // quickTeleportHotbar.Visible = false; // quickTeleportHotbar.Hide(); // quickClearHotbar = new QuickClearHotbar(this); // quickClearHotbar.Visible = false; // quickClearHotbar.Hide(); // npcButchererHotbar = new NPCButchererHotbar(this); // npcButchererHotbar.Visible = false; // npcButchererHotbar.Hide(); //eventManagerHotbar = new EventManagerHotbar(this); //eventManagerHotbar.Visible = false; //eventManagerHotbar.Hide(); hotbar = new Hotbar(this); //hotbar.Position = new Microsoft.Xna.Framework.Vector2(120, 180); hotbar.Visible = true; if (!ModContent.GetInstance <CheatSheetClientConfig>().HotbarShownByDefault) { hotbar.Hide(); } else { hotbar.Show(); } } catch (Exception e) { Logger.Error(e.ToString()); } } }