fix(ui): restore retail vitals and window interactions
This commit is contained in:
parent
4d84456c21
commit
1bd2b30291
36 changed files with 1462 additions and 86 deletions
|
|
@ -48,6 +48,27 @@ public sealed class RetailWindowLayoutPersistence : IDisposable
|
|||
/// mid-drag reload would litter settings.json with intermediate-resolution
|
||||
/// keys.</summary>
|
||||
public void RestoreAll(bool saveBack = true)
|
||||
=> RestoreAllCore(
|
||||
saveBack,
|
||||
restoreVisibility: true);
|
||||
|
||||
/// <summary>
|
||||
/// Reloads the current resolution's saved geometry after a live display
|
||||
/// change. Retail's <c>UI-<char>-<world>-<W>-<H>.txt</c>
|
||||
/// records only X/Y/W/H; global message <c>0xE</c> therefore cannot hide
|
||||
/// a window. Keeping live visibility is especially load-bearing for the Options window:
|
||||
/// hiding Config while its Resolution row is still uncommitted invokes
|
||||
/// <c>PlayerOptionPage::OnVisibilityChanged(false)</c> and restores the
|
||||
/// previous resolution, producing a resize-out/resize-back blip.
|
||||
/// </summary>
|
||||
public void RestoreAfterDisplayChange()
|
||||
=> RestoreAllCore(
|
||||
saveBack: false,
|
||||
restoreVisibility: false);
|
||||
|
||||
private void RestoreAllCore(
|
||||
bool saveBack,
|
||||
bool restoreVisibility)
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(_disposed, this);
|
||||
string character = _characterKey();
|
||||
|
|
@ -72,7 +93,9 @@ public sealed class RetailWindowLayoutPersistence : IDisposable
|
|||
handle,
|
||||
layout,
|
||||
screen,
|
||||
restoreVisibility: !_stateManagedVisibilityWindows.Contains(handle.Name));
|
||||
restoreVisibility:
|
||||
restoreVisibility
|
||||
&& !_stateManagedVisibilityWindows.Contains(handle.Name));
|
||||
// Lazily migrate legacy position-only entries into the complete schema.
|
||||
if (saveBack)
|
||||
_store.SaveWindowLayout(character, resolution, handle.Name, Capture(handle));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue