Keyboard panel handling WIP
This commit is contained in:
@@ -1,18 +1,24 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Reactive.Linq;
|
||||
using System.Reactive.Subjects;
|
||||
using FileTime.App.Core.ViewModels;
|
||||
using FileTime.App.Core.ViewModels.Timeline;
|
||||
using FileTime.Core.Models;
|
||||
using FileTime.GuiApp.Configuration;
|
||||
using FileTime.GuiApp.Models;
|
||||
using FileTime.GuiApp.ViewModels;
|
||||
using MvvmGen;
|
||||
|
||||
namespace FileTime.GuiApp.CustomImpl.ViewModels;
|
||||
|
||||
[ViewModel(GenerateConstructor = false)]
|
||||
public partial class GuiAppState : AppStateBase, IGuiAppState
|
||||
public partial class GuiAppState : AppStateBase, IGuiAppState, IDisposable
|
||||
{
|
||||
private readonly BehaviorSubject<GuiPanel> _activePanel = new(GuiPanel.FileBrowser);
|
||||
|
||||
public GuiAppState(ITimelineViewModel timelineViewModel) : base(timelineViewModel)
|
||||
{
|
||||
ActivePanel = _activePanel.AsObservable();
|
||||
}
|
||||
|
||||
[Property] private bool _isAllShortcutVisible;
|
||||
@@ -27,4 +33,14 @@ public partial class GuiAppState : AppStateBase, IGuiAppState
|
||||
|
||||
public List<KeyConfig> PreviousKeys { get; } = new();
|
||||
public ObservableCollection<string> PopupTexts { get; } = new();
|
||||
}
|
||||
|
||||
public IObservable<GuiPanel> ActivePanel { get; }
|
||||
|
||||
public void SetActivePanel(GuiPanel newPanel)
|
||||
=> _activePanel.OnNext(newPanel);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_activePanel.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user