增加预览画面首选项
This commit is contained in:
@@ -71,6 +71,22 @@ namespace SpineViewer.Models
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 预览画面首选项
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private uint _maxFps = 30;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private float _speed = 1f;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool _showAxis = true;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private Color _backgroundColor = Color.FromRgb(105, 105, 105);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 程序选项
|
#region 程序选项
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
|||||||
@@ -229,6 +229,8 @@
|
|||||||
|
|
||||||
<s:String x:Key="Str_SpineLoadPreference">Model Loading Options</s:String>
|
<s:String x:Key="Str_SpineLoadPreference">Model Loading Options</s:String>
|
||||||
|
|
||||||
|
<s:String x:Key="Str_RendererPreference">Preview Options</s:String>
|
||||||
|
|
||||||
<s:String x:Key="Str_AppPreference">Application Options</s:String>
|
<s:String x:Key="Str_AppPreference">Application Options</s:String>
|
||||||
<s:String x:Key="Str_Language">Language</s:String>
|
<s:String x:Key="Str_Language">Language</s:String>
|
||||||
|
|
||||||
|
|||||||
@@ -229,6 +229,8 @@
|
|||||||
|
|
||||||
<s:String x:Key="Str_SpineLoadPreference">モデル読み込みオプション</s:String>
|
<s:String x:Key="Str_SpineLoadPreference">モデル読み込みオプション</s:String>
|
||||||
|
|
||||||
|
<s:String x:Key="Str_RendererPreference">プレビュー画面オプション</s:String>
|
||||||
|
|
||||||
<s:String x:Key="Str_AppPreference">アプリケーションプション</s:String>
|
<s:String x:Key="Str_AppPreference">アプリケーションプション</s:String>
|
||||||
<s:String x:Key="Str_Language">言語</s:String>
|
<s:String x:Key="Str_Language">言語</s:String>
|
||||||
|
|
||||||
|
|||||||
@@ -229,6 +229,8 @@
|
|||||||
|
|
||||||
<s:String x:Key="Str_SpineLoadPreference">模型加载选项</s:String>
|
<s:String x:Key="Str_SpineLoadPreference">模型加载选项</s:String>
|
||||||
|
|
||||||
|
<s:String x:Key="Str_RendererPreference">预览画面选项</s:String>
|
||||||
|
|
||||||
<s:String x:Key="Str_AppPreference">应用程序选项</s:String>
|
<s:String x:Key="Str_AppPreference">应用程序选项</s:String>
|
||||||
<s:String x:Key="Str_Language">语言</s:String>
|
<s:String x:Key="Str_Language">语言</s:String>
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,11 @@ namespace SpineViewer.ViewModels.MainWindow
|
|||||||
DebugPoints = DebugPoints,
|
DebugPoints = DebugPoints,
|
||||||
DebugClippings = DebugClippings,
|
DebugClippings = DebugClippings,
|
||||||
|
|
||||||
|
MaxFps = MaxFps,
|
||||||
|
Speed = Speed,
|
||||||
|
ShowAxis = ShowAxis,
|
||||||
|
BackgroundColor = BackgroundColor,
|
||||||
|
|
||||||
RenderSelectedOnly = RenderSelectedOnly,
|
RenderSelectedOnly = RenderSelectedOnly,
|
||||||
AppLanguage = AppLanguage,
|
AppLanguage = AppLanguage,
|
||||||
};
|
};
|
||||||
@@ -117,6 +122,11 @@ namespace SpineViewer.ViewModels.MainWindow
|
|||||||
DebugPoints = value.DebugPoints;
|
DebugPoints = value.DebugPoints;
|
||||||
DebugClippings = value.DebugClippings;
|
DebugClippings = value.DebugClippings;
|
||||||
|
|
||||||
|
MaxFps = value.MaxFps;
|
||||||
|
Speed = value.Speed;
|
||||||
|
ShowAxis = value.ShowAxis;
|
||||||
|
BackgroundColor = value.BackgroundColor;
|
||||||
|
|
||||||
RenderSelectedOnly = value.RenderSelectedOnly;
|
RenderSelectedOnly = value.RenderSelectedOnly;
|
||||||
AppLanguage = value.AppLanguage;
|
AppLanguage = value.AppLanguage;
|
||||||
}
|
}
|
||||||
@@ -220,6 +230,34 @@ namespace SpineViewer.ViewModels.MainWindow
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 预览画面首选项
|
||||||
|
|
||||||
|
public uint MaxFps
|
||||||
|
{
|
||||||
|
get => _vmMain.SFMLRendererViewModel.MaxFps;
|
||||||
|
set => SetProperty(_vmMain.SFMLRendererViewModel.MaxFps, value, v => _vmMain.SFMLRendererViewModel.MaxFps = value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public float Speed
|
||||||
|
{
|
||||||
|
get => _vmMain.SFMLRendererViewModel.Speed;
|
||||||
|
set => SetProperty(_vmMain.SFMLRendererViewModel.Speed, value, v => _vmMain.SFMLRendererViewModel.Speed = value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool ShowAxis
|
||||||
|
{
|
||||||
|
get => _vmMain.SFMLRendererViewModel.ShowAxis;
|
||||||
|
set => SetProperty(_vmMain.SFMLRendererViewModel.ShowAxis, value, v => _vmMain.SFMLRendererViewModel.ShowAxis = value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Color BackgroundColor
|
||||||
|
{
|
||||||
|
get => _vmMain.SFMLRendererViewModel.BackgroundColor;
|
||||||
|
set => SetProperty(_vmMain.SFMLRendererViewModel.BackgroundColor, value, v => _vmMain.SFMLRendererViewModel.BackgroundColor = value);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 程序选项
|
#region 程序选项
|
||||||
|
|
||||||
public static ImmutableArray<AppLanguage> AppLanguageOptions { get; } = Enum.GetValues<AppLanguage>().ToImmutableArray();
|
public static ImmutableArray<AppLanguage> AppLanguageOptions { get; } = Enum.GetValues<AppLanguage>().ToImmutableArray();
|
||||||
|
|||||||
@@ -134,6 +134,34 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
|
<GroupBox Header="{DynamicResource Str_RendererPreference}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="Col1"/>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Content="{DynamicResource Str_MaxFps}"/>
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding MaxFps}"/>
|
||||||
|
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource Str_PlaySpeed}"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Speed}"/>
|
||||||
|
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Content="{DynamicResource Str_ShowAxis}"/>
|
||||||
|
<ToggleButton Grid.Row="2" Grid.Column="1" IsChecked="{Binding ShowAxis}"/>
|
||||||
|
|
||||||
|
<Label Grid.Row="3" Grid.Column="0" Content="{DynamicResource Str_BackgroundColor}" ToolTip="#AARRGGBB"/>
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding BackgroundColor}" ToolTip="#AARRGGBB"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Header="{DynamicResource Str_AppPreference}">
|
<GroupBox Header="{DynamicResource Str_AppPreference}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
Reference in New Issue
Block a user