private unsafe void HideHUDLayoutDetour(void *agentHudLayout) { _p.ui.IsVisible = false; hookHideHUDLayout.Original(agentHudLayout); hudLayoutScreen = null; hudLayoutWindow = null; this.agentHudLayout = null; }
public unsafe AtkUnitBase *GetCurrentAddon() { if (hudLayoutScreen == null) { var addon = _p.pluginInterface.Framework.Gui.GetAddonByName("_HudLayoutScreen", 1); if (addon != null) { hudLayoutScreen = (AddonHudLayoutScreen *)addon.Address.ToPointer(); } else { return(null); } } if (hudLayoutWindow == null) { var addon = _p.pluginInterface.Framework.Gui.GetAddonByName("_HudLayoutWindow", 1); if (addon != null) { hudLayoutWindow = (AddonHudLayoutWindow *)addon.Address.ToPointer(); } else { return(null); } } if (hudLayoutScreen->SelectedAddon == null) { return(null); } if (hudLayoutScreen->SelectedAddon->SelectedAtkUnit == null) { return(null); } if (hudLayoutWindow->SaveButton == null) { return(null); } return(hudLayoutScreen->SelectedAddon->SelectedAtkUnit); }
private unsafe void ShowHUDLayoutDetour(void *agentHudLayout) { hookShowHUDLayout.Original(agentHudLayout); this.agentHudLayout = (AgentHudLayout *)agentHudLayout; _p.ui.IsVisible = true; var addon = _p.pluginInterface.Framework.Gui.GetAddonByName("_HudLayoutScreen", 1); if (addon != null) { hudLayoutScreen = (AddonHudLayoutScreen *)addon.Address.ToPointer(); } addon = _p.pluginInterface.Framework.Gui.GetAddonByName("_HudLayoutWindow", 1); if (addon != null) { hudLayoutWindow = (AddonHudLayoutWindow *)addon.Address.ToPointer(); } }