Thumbnail strip: show hotkey label next to each scene name
This commit is contained in:
@@ -15,6 +15,7 @@ public class Scene : INotifyPropertyChanged
|
||||
private bool _hasSocialBar;
|
||||
private bool _isStaged;
|
||||
private bool _isLive;
|
||||
private string _hotkeyLabel = string.Empty;
|
||||
|
||||
public bool IsStaged
|
||||
{
|
||||
@@ -83,6 +84,16 @@ public class Scene : INotifyPropertyChanged
|
||||
set => Set(ref _snapshot, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The current hotkey label for this scene (e.g. "F1", "Ctrl+F10").
|
||||
/// Set by MainViewModel from the active bindings; empty for non-canonical scenes.
|
||||
/// </summary>
|
||||
public string HotkeyLabel
|
||||
{
|
||||
get => _hotkeyLabel;
|
||||
set => Set(ref _hotkeyLabel, value);
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
private void Set<T>(ref T field, T value, [CallerMemberName] string? propertyName = null)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows.Data;
|
||||
using ytLive.Services;
|
||||
|
||||
namespace ytLive.Models;
|
||||
|
||||
@@ -21,6 +23,16 @@ public static class SceneCatalog
|
||||
|
||||
public static readonly string[] All = { Starting, Live, Brb, Chat, Ending };
|
||||
|
||||
/// <summary>Maps each canonical scene name to its hotkey action.</summary>
|
||||
public static readonly IReadOnlyDictionary<string, HotkeyId> SceneHotkeys = new Dictionary<string, HotkeyId>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
[Starting] = HotkeyId.SceneStarting,
|
||||
[Live] = HotkeyId.SceneLive,
|
||||
[Brb] = HotkeyId.SceneBrb,
|
||||
[Chat] = HotkeyId.SceneChat,
|
||||
[Ending] = HotkeyId.SceneEnding,
|
||||
};
|
||||
|
||||
private static readonly Dictionary<string, string> DisplayNames = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user