mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-30 20:33:43 +01:00
Update to API4, use IPC instead of API-project. Replace Actor in most visible names with Object, Character or Player..
This commit is contained in:
parent
3680d2b63f
commit
4dfc2cf665
60 changed files with 812 additions and 740 deletions
|
|
@ -12,34 +12,34 @@ namespace Penumbra.UI
|
|||
private static readonly Vector2 AutoFillSize = new( -1, -1 );
|
||||
private static readonly Vector2 ZeroVector = new( 0, 0 );
|
||||
|
||||
private readonly Plugin _plugin;
|
||||
private readonly Penumbra _penumbra;
|
||||
|
||||
private readonly ManageModsButton _manageModsButton;
|
||||
private readonly MenuBar _menuBar;
|
||||
private readonly SettingsMenu _menu;
|
||||
private readonly ModManager _modManager;
|
||||
|
||||
public SettingsInterface( Plugin plugin )
|
||||
public SettingsInterface( Penumbra penumbra )
|
||||
{
|
||||
_plugin = plugin;
|
||||
_penumbra = penumbra;
|
||||
_manageModsButton = new ManageModsButton( this );
|
||||
_menuBar = new MenuBar( this );
|
||||
_menu = new SettingsMenu( this );
|
||||
_modManager = Service< ModManager >.Get();
|
||||
|
||||
_plugin.PluginInterface.UiBuilder.DisableGposeUiHide = true;
|
||||
_plugin.PluginInterface.UiBuilder.OnBuildUi += Draw;
|
||||
_plugin.PluginInterface.UiBuilder.OnOpenConfigUi += OpenConfig;
|
||||
Dalamud.PluginInterface.UiBuilder.DisableGposeUiHide = true;
|
||||
Dalamud.PluginInterface.UiBuilder.Draw += Draw;
|
||||
Dalamud.PluginInterface.UiBuilder.OpenConfigUi += OpenConfig;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_menu.InstalledTab.Selector.Cache.Dispose();
|
||||
_plugin.PluginInterface.UiBuilder.OnBuildUi -= Draw;
|
||||
_plugin.PluginInterface.UiBuilder.OnOpenConfigUi -= OpenConfig;
|
||||
Dalamud.PluginInterface.UiBuilder.Draw -= Draw;
|
||||
Dalamud.PluginInterface.UiBuilder.OpenConfigUi -= OpenConfig;
|
||||
}
|
||||
|
||||
private void OpenConfig( object _1, EventArgs _2 )
|
||||
private void OpenConfig()
|
||||
=> _menu.Visible = true;
|
||||
|
||||
public void FlipVisibility()
|
||||
|
|
@ -58,14 +58,14 @@ namespace Penumbra.UI
|
|||
private void ReloadMods()
|
||||
{
|
||||
_menu.InstalledTab.Selector.ClearSelection();
|
||||
_modManager.DiscoverMods( _plugin.Configuration.ModDirectory );
|
||||
_modManager.DiscoverMods( Penumbra.Config.ModDirectory );
|
||||
_menu.InstalledTab.Selector.Cache.TriggerListReset();
|
||||
}
|
||||
|
||||
private void SaveCurrentCollection( bool recalculateMeta )
|
||||
{
|
||||
var current = _modManager.Collections.CurrentCollection;
|
||||
current.Save( _plugin.PluginInterface );
|
||||
current.Save();
|
||||
RecalculateCurrent( recalculateMeta );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue