mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
支持主题和字体修改
This commit is contained in:
parent
813fd373fe
commit
85d22dbb96
@ -7,6 +7,18 @@ namespace VPet_Simulator.Core
|
|||||||
{
|
{
|
||||||
public static partial class Function
|
public static partial class Function
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// HEX值转颜色
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="HEX">HEX值</param>
|
||||||
|
/// <returns>颜色</returns>
|
||||||
|
public static Color HEXToColor(string HEX) => (Color)ColorConverter.ConvertFromString(HEX);
|
||||||
|
/// <summary>
|
||||||
|
/// 颜色转HEX值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="color">颜色</param>
|
||||||
|
/// <returns>HEX值</returns>
|
||||||
|
public static string ColorToHEX(Color color) => "#" + color.R.ToString("X2") + color.G.ToString("X2") + color.B.ToString("X2");
|
||||||
public static Random Rnd = new Random();
|
public static Random Rnd = new Random();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取资源笔刷
|
/// 获取资源笔刷
|
||||||
@ -15,7 +27,7 @@ namespace VPet_Simulator.Core
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Brush ResourcesBrush(BrushType name)
|
public static Brush ResourcesBrush(BrushType name)
|
||||||
{
|
{
|
||||||
return (Brush)Application.Current.Resources.MergedDictionaries[0].MergedDictionaries[0][name.ToString()];
|
return (Brush)Application.Current.Resources[name.ToString()];
|
||||||
}
|
}
|
||||||
public enum BrushType
|
public enum BrushType
|
||||||
{
|
{
|
||||||
|
@ -37,6 +37,7 @@ namespace VPet_Simulator.Windows.Interface
|
|||||||
autobuy = this["gameconfig"].GetBool("autobuy");
|
autobuy = this["gameconfig"].GetBool("autobuy");
|
||||||
autogift = this["gameconfig"].GetBool("autogift");
|
autogift = this["gameconfig"].GetBool("autogift");
|
||||||
}
|
}
|
||||||
|
|
||||||
//public override string ToString()
|
//public override string ToString()
|
||||||
//{//留作备份,未来版本删了
|
//{//留作备份,未来版本删了
|
||||||
// this["statistics"] = new Line("statistics", "", "", Statistics_OLD.ToSubs().ToArray());
|
// this["statistics"] = new Line("statistics", "", "", Statistics_OLD.ToSubs().ToArray());
|
||||||
|
54
VPet-Simulator.Windows.Interface/Theme.cs
Normal file
54
VPet-Simulator.Windows.Interface/Theme.cs
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
using LinePutScript;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace VPet_Simulator.Windows.Interface
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏主题
|
||||||
|
/// </summary>
|
||||||
|
public class Theme
|
||||||
|
{
|
||||||
|
public string Name;
|
||||||
|
public string xName;
|
||||||
|
public string Image;
|
||||||
|
public ImageResources Images;
|
||||||
|
public LpsDocument ThemeColor;
|
||||||
|
public Theme(LpsDocument lps)
|
||||||
|
{
|
||||||
|
xName = lps.First().Name;
|
||||||
|
Name = lps.First().Info;
|
||||||
|
Image = lps.First().Find("image").info;
|
||||||
|
|
||||||
|
lps.RemoveAt(0);
|
||||||
|
ThemeColor = lps;
|
||||||
|
|
||||||
|
Images = new ImageResources();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 字体
|
||||||
|
/// </summary>
|
||||||
|
public class IFont
|
||||||
|
{
|
||||||
|
public string Name;
|
||||||
|
public string Path;
|
||||||
|
public IFont(FileInfo path)
|
||||||
|
{
|
||||||
|
Name = path.Name.Substring(0, path.Name.Length - path.Extension.Length);
|
||||||
|
Path = path.Directory.FullName + @"\#" + Name;
|
||||||
|
}
|
||||||
|
public FontFamily Font
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{//file:///D:\Documents\Visual Studio 2022\Projects\VPet\VPet-Simulator.Windows\Res\#凤凰点阵体 12px
|
||||||
|
return new FontFamily(@"file:///" + Path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup>
|
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
|
|
||||||
</startup>
|
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="SendKeys" value="SendInput"/>
|
<add key="SendKeys" value="SendInput"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
|
@ -1,31 +1,23 @@
|
|||||||
<Application
|
<Application x:Class="VPet_Simulator.Windows.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
x:Class="VPet_Simulator.Windows.App"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:VPet_Simulator.Windows"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui" StartupUri="MainWindow.xaml">
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
<Application.Resources>
|
||||||
xmlns:local="clr-namespace:VPet_Simulator.Windows"
|
|
||||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
|
||||||
StartupUri="MainWindow.xaml">
|
|
||||||
<Application.Resources>
|
|
||||||
<ResourceDictionary>
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
|
||||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<FontFamily x:Key="MainFont">
|
<ResourceDictionary.MergedDictionaries>
|
||||||
/VPet-Simulator.Windows;component/Res/Font/#OPPOSans R
|
<ResourceDictionary>
|
||||||
</FontFamily>
|
<FontFamily x:Key="MainFont">
|
||||||
<FontFamily x:Key="RemixIcon">
|
/VPet-Simulator.Windows;component/Res/Font/#OPPOSans R
|
||||||
/VPet-Simulator.Windows;component/Res/#remixicon
|
</FontFamily>
|
||||||
</FontFamily>
|
<FontFamily x:Key="RemixIcon">
|
||||||
|
/VPet-Simulator.Windows;component/Res/#remixicon
|
||||||
|
</FontFamily>
|
||||||
|
</ResourceDictionary>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<pu:GlobalSettings x:Key="globalSettings" FontFamily="{StaticResource MainFont}" FontSize="14"
|
||||||
|
IconFontFamily="/VPet-Simulator.Windows;component/Res/#remixicon" IconFontSize="16" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
<ResourceDictionary>
|
</Application.Resources>
|
||||||
<pu:GlobalSettings
|
|
||||||
x:Key="globalSettings"
|
|
||||||
FontFamily="{StaticResource MainFont}"
|
|
||||||
FontSize="14"
|
|
||||||
IconFontFamily="/VPet-Simulator.Windows;component/Res/#remixicon"
|
|
||||||
IconFontSize="16" />
|
|
||||||
</ResourceDictionary>
|
|
||||||
</ResourceDictionary.MergedDictionaries>
|
|
||||||
</ResourceDictionary>
|
|
||||||
</Application.Resources>
|
|
||||||
</Application>
|
</Application>
|
||||||
|
@ -9,7 +9,9 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Reflection.Metadata;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Media;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
using VPet_Simulator.Core;
|
using VPet_Simulator.Core;
|
||||||
using VPet_Simulator.Windows.Interface;
|
using VPet_Simulator.Windows.Interface;
|
||||||
@ -125,6 +127,39 @@ namespace VPet_Simulator.Windows
|
|||||||
{
|
{
|
||||||
switch (di.Name.ToLower())
|
switch (di.Name.ToLower())
|
||||||
{
|
{
|
||||||
|
case "theme":
|
||||||
|
Tag.Add("theme");
|
||||||
|
if (Directory.Exists(di.FullName + @"\fonts"))
|
||||||
|
foreach (var str in Directory.EnumerateFiles(di.FullName + @"\fonts", "*.ttf"))
|
||||||
|
{
|
||||||
|
mw.Fonts.Add(new IFont(new FileInfo(str)));
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (FileInfo fi in di.EnumerateFiles("*.lps"))
|
||||||
|
{
|
||||||
|
var tmp = new Theme(new LpsDocument(File.ReadAllText(fi.FullName)));
|
||||||
|
var oldtheme = mw.Themes.Find(x => x.xName == tmp.xName);
|
||||||
|
if (oldtheme != null)
|
||||||
|
mw.Themes.Remove(oldtheme);
|
||||||
|
mw.Themes.Add(tmp);
|
||||||
|
//加载图片包
|
||||||
|
DirectoryInfo tmpdi = new DirectoryInfo(di.FullName + '\\' + tmp.Image);
|
||||||
|
if (tmpdi.Exists)
|
||||||
|
{
|
||||||
|
foreach (FileInfo tmpfi in tmpdi.EnumerateFiles("*.png"))
|
||||||
|
{
|
||||||
|
tmp.Images.AddSource(tmpfi.Name.ToLower().Substring(0, tmpfi.Name.Length - 4), tmpfi.FullName);
|
||||||
|
}
|
||||||
|
foreach (DirectoryInfo fordi in tmpdi.EnumerateDirectories())
|
||||||
|
{
|
||||||
|
foreach (FileInfo tmpfi in fordi.EnumerateFiles("*.png"))
|
||||||
|
{
|
||||||
|
tmp.Images.AddSource(fordi.Name + '_' + tmpfi.Name.ToLower().Substring(0, tmpfi.Name.Length - 4), tmpfi.FullName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "pet":
|
case "pet":
|
||||||
//宠物模型
|
//宠物模型
|
||||||
foreach (FileInfo fi in di.EnumerateFiles("*.lps"))
|
foreach (FileInfo fi in di.EnumerateFiles("*.lps"))
|
||||||
|
@ -35,6 +35,7 @@ using Line = LinePutScript.Line;
|
|||||||
using static VPet_Simulator.Windows.Interface.ExtensionFunction;
|
using static VPet_Simulator.Windows.Interface.ExtensionFunction;
|
||||||
using Image = System.Windows.Controls.Image;
|
using Image = System.Windows.Controls.Image;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Windows.Media;
|
||||||
#if SteamOutput
|
#if SteamOutput
|
||||||
using VPet.Solution;
|
using VPet.Solution;
|
||||||
#endif
|
#endif
|
||||||
@ -76,6 +77,84 @@ namespace VPet_Simulator.Windows
|
|||||||
/// 所有三方插件
|
/// 所有三方插件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<MainPlugin> Plugins { get; } = new List<MainPlugin>();
|
public List<MainPlugin> Plugins { get; } = new List<MainPlugin>();
|
||||||
|
/// <summary>
|
||||||
|
/// 所有字体(位置)
|
||||||
|
/// </summary>
|
||||||
|
public List<IFont> Fonts { get; } = new List<IFont>();
|
||||||
|
/// <summary>
|
||||||
|
/// 所有主题
|
||||||
|
/// </summary>
|
||||||
|
public List<Theme> Themes = new List<Theme>();
|
||||||
|
/// <summary>
|
||||||
|
/// 当前启用主题
|
||||||
|
/// </summary>
|
||||||
|
public Theme Theme = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 加载主题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="themename">主题名称</param>
|
||||||
|
public void LoadTheme(string themename)
|
||||||
|
{
|
||||||
|
Theme ctheme = Themes.Find(x => x.Name == themename || x.xName == themename);
|
||||||
|
if (ctheme == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Theme = ctheme;
|
||||||
|
|
||||||
|
//加载图片包
|
||||||
|
ImageSources.AddSources(ctheme.Images);
|
||||||
|
|
||||||
|
//阴影颜色
|
||||||
|
Application.Current.Resources["ShadowColor"] = Function.HEXToColor('#' + ctheme.ThemeColor[(gstr)"ShadowColor"]);
|
||||||
|
|
||||||
|
foreach (ILine lin in ctheme.ThemeColor.Assemblage.FindAll(x => !x.Name.Contains("Color")))
|
||||||
|
Application.Current.Resources[lin.Name] = new SolidColorBrush(Function.HEXToColor('#' + lin.info));
|
||||||
|
|
||||||
|
//系统生成部分颜色
|
||||||
|
Color c = Function.HEXToColor('#' + ctheme.ThemeColor["Primary"].info);
|
||||||
|
c.A = 204;
|
||||||
|
Application.Current.Resources["PrimaryTrans"] = new SolidColorBrush(c);
|
||||||
|
c.A = 44;
|
||||||
|
Application.Current.Resources["PrimaryTrans4"] = new SolidColorBrush(c);
|
||||||
|
c.A = 170;
|
||||||
|
Application.Current.Resources["PrimaryTransA"] = new SolidColorBrush(c);
|
||||||
|
c.A = 238;
|
||||||
|
Application.Current.Resources["PrimaryTransE"] = new SolidColorBrush(c);
|
||||||
|
|
||||||
|
c = Function.HEXToColor('#' + ctheme.ThemeColor["Secondary"].info);
|
||||||
|
c.A = 204;
|
||||||
|
Application.Current.Resources["SecondaryTrans"] = new SolidColorBrush(c);
|
||||||
|
c.A = 44;
|
||||||
|
Application.Current.Resources["SecondaryTrans4"] = new SolidColorBrush(c);
|
||||||
|
c.A = 170;
|
||||||
|
Application.Current.Resources["SecondaryTransA"] = new SolidColorBrush(c);
|
||||||
|
c.A = 238;
|
||||||
|
Application.Current.Resources["SecondaryTransE"] = new SolidColorBrush(c);
|
||||||
|
|
||||||
|
|
||||||
|
c = Function.HEXToColor('#' + ctheme.ThemeColor["DARKPrimary"].info);
|
||||||
|
c.A = 204;
|
||||||
|
Application.Current.Resources["DARKPrimaryTrans"] = new SolidColorBrush(c);
|
||||||
|
c.A = 44;
|
||||||
|
Application.Current.Resources["DARKPrimaryTrans4"] = new SolidColorBrush(c);
|
||||||
|
c.A = 170;
|
||||||
|
Application.Current.Resources["DARKPrimaryTransA"] = new SolidColorBrush(c);
|
||||||
|
c.A = 238;
|
||||||
|
Application.Current.Resources["DARKPrimaryTransE"] = new SolidColorBrush(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadFont(string fontname)
|
||||||
|
{
|
||||||
|
IFont cfont = Fonts.Find(x => x.Name == fontname);
|
||||||
|
if (cfont == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Application.Current.Resources["MainFont"] = cfont.Font;
|
||||||
|
Panuon.WPF.UI.GlobalSettings.Setting.FontFamily = cfont.Font;
|
||||||
|
}
|
||||||
|
|
||||||
public List<Food> Foods { get; } = new List<Food>();
|
public List<Food> Foods { get; } = new List<Food>();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 版本号
|
/// 版本号
|
||||||
@ -1427,6 +1506,10 @@ namespace VPet_Simulator.Windows
|
|||||||
Main = new Main(Core);
|
Main = new Main(Core);
|
||||||
Main.NoFunctionMOD = Set.CalFunState;
|
Main.NoFunctionMOD = Set.CalFunState;
|
||||||
|
|
||||||
|
//加载主题:
|
||||||
|
LoadTheme(Set.Theme);
|
||||||
|
//加载字体
|
||||||
|
LoadFont(Set.Font);
|
||||||
|
|
||||||
LoadingText.Content = "正在加载游戏\n该步骤可能会耗时比较长\n请耐心等待".Translate();
|
LoadingText.Content = "正在加载游戏\n该步骤可能会耗时比较长\n请耐心等待".Translate();
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" d:DesignHeight="1000"
|
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" d:DesignHeight="1000"
|
||||||
xmlns:system="clr-namespace:System;assembly=mscorlib" Width="{ll:Dbe SettingWidth, DefValue=650}" Height="550"
|
xmlns:system="clr-namespace:System;assembly=mscorlib" Width="{ll:Dbe SettingWidth, DefValue=650}" Height="550"
|
||||||
Closing="WindowX_Closing" FontSize="16" Style="{DynamicResource BaseWindowXStyle}" Topmost="True"
|
Closing="WindowX_Closing" FontSize="16" Style="{DynamicResource BaseWindowXStyle}" Topmost="True"
|
||||||
WindowStartupLocation="CenterScreen" mc:Ignorable="d">
|
WindowStartupLocation="CenterScreen" mc:Ignorable="d">
|
||||||
<!--<pu:WindowX.Resources>
|
<!--<pu:WindowX.Resources>
|
||||||
<DataTemplate x:Key="DIYDataTemplate">
|
<DataTemplate x:Key="DIYDataTemplate">
|
||||||
@ -20,11 +20,12 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBox x:Name="tb_seach_menu" FontSize="16" pu:TextBoxHelper.Watermark="{ll:Str 搜索设置}"
|
<TextBox x:Name="tb_seach_menu" FontSize="16" pu:TextBoxHelper.Watermark="{ll:Str 搜索设置}"
|
||||||
Style="{DynamicResource StandardTextBoxStyle}" VerticalAlignment="Top" Margin="3,6,6,0" TextChanged="tb_seach_menu_textchange" />
|
Style="{DynamicResource StandardTextBoxStyle}" VerticalAlignment="Top" Margin="3,6,6,0"
|
||||||
|
TextChanged="tb_seach_menu_textchange" />
|
||||||
<ListBox x:Name="ListMenu" ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
<ListBox x:Name="ListMenu" ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="3,40,6,3"
|
ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="3,40,6,3"
|
||||||
BorderBrush="{DynamicResource Primary}"
|
BorderBrush="{DynamicResource Primary}" pu:ListBoxHelper.CornerRadius="5" BorderThickness="2"
|
||||||
pu:ListBoxHelper.CornerRadius="5" BorderThickness="2" Background="{DynamicResource SecondaryLighter}"
|
Background="{DynamicResource SecondaryLighter}"
|
||||||
pu:ListBoxHelper.ItemsHoverBackground="{DynamicResource Primary}"
|
pu:ListBoxHelper.ItemsHoverBackground="{DynamicResource Primary}"
|
||||||
pu:ListBoxHelper.ItemsSelectedBackground="{DynamicResource SecondaryLight}" />
|
pu:ListBoxHelper.ItemsSelectedBackground="{DynamicResource SecondaryLight}" />
|
||||||
<GridSplitter Width="3" Background="{DynamicResource PrimaryDarker}" />
|
<GridSplitter Width="3" Background="{DynamicResource PrimaryDarker}" />
|
||||||
@ -149,12 +150,12 @@
|
|||||||
<TextBlock Grid.Row="5" Grid.ColumnSpan="2" VerticalAlignment="Center" Text="{ll:Str 渲染分辨率}" />
|
<TextBlock Grid.Row="5" Grid.ColumnSpan="2" VerticalAlignment="Center" Text="{ll:Str 渲染分辨率}" />
|
||||||
<TextBlock Grid.Row="6" VerticalAlignment="Center" Text="{ll:Str 主题}" />
|
<TextBlock Grid.Row="6" VerticalAlignment="Center" Text="{ll:Str 主题}" />
|
||||||
<ComboBox x:Name="ThemeBox" Grid.Row="6" Grid.Column="2" Margin="0,3,0,2" FontSize="16"
|
<ComboBox x:Name="ThemeBox" Grid.Row="6" Grid.Column="2" Margin="0,3,0,2" FontSize="16"
|
||||||
IsEnabled="False" SelectionChanged="ThemeBox_SelectionChanged"
|
SelectionChanged="ThemeBox_SelectionChanged"
|
||||||
Style="{DynamicResource StandardComboBoxStyle}" />
|
Style="{DynamicResource StandardComboBoxStyle}" />
|
||||||
|
|
||||||
<TextBlock Grid.Row="7" VerticalAlignment="Center" Text="{ll:Str 字体}" />
|
<TextBlock Grid.Row="7" VerticalAlignment="Center" Text="{ll:Str 字体}" />
|
||||||
<ComboBox x:Name="FontBox" Grid.Row="7" Grid.Column="2" Margin="0,2,0,3" FontSize="16"
|
<ComboBox x:Name="FontBox" Grid.Row="7" Grid.Column="2" Margin="0,2,0,3" FontSize="16"
|
||||||
IsEnabled="False" SelectionChanged="FontBox_SelectionChanged"
|
SelectionChanged="FontBox_SelectionChanged"
|
||||||
Style="{DynamicResource StandardComboBoxStyle}" />
|
Style="{DynamicResource StandardComboBoxStyle}" />
|
||||||
<TextBlock Grid.Row="8" VerticalAlignment="Center" Text="{ll:Str 启动位置}" />
|
<TextBlock Grid.Row="8" VerticalAlignment="Center" Text="{ll:Str 启动位置}" />
|
||||||
<Grid Grid.Row="8" Grid.Column="2">
|
<Grid Grid.Row="8" Grid.Column="2">
|
||||||
@ -396,9 +397,9 @@
|
|||||||
<Button x:Name="btn_cleancache" Grid.Row="1" Grid.Column="2" Margin="4" Padding="1"
|
<Button x:Name="btn_cleancache" Grid.Row="1" Grid.Column="2" Margin="4" Padding="1"
|
||||||
pu:ButtonHelper.CornerRadius="4" Background="{DynamicResource SecondaryLight}"
|
pu:ButtonHelper.CornerRadius="4" Background="{DynamicResource SecondaryLight}"
|
||||||
Click="cleancache_click" Content="{ll:Str 清理缓存}" ToolTip="{ll:Str '清理缓存的动画,声音文件'}" />
|
Click="cleancache_click" Content="{ll:Str 清理缓存}" ToolTip="{ll:Str '清理缓存的动画,声音文件'}" />
|
||||||
<Button Grid.Row="1" Grid.Column="2" Margin="4" Padding="1"
|
<Button Grid.Row="1" Grid.Column="2" Margin="4" Padding="1" pu:ButtonHelper.CornerRadius="4"
|
||||||
pu:ButtonHelper.CornerRadius="4" Background="{DynamicResource SecondaryLight}"
|
Background="{DynamicResource SecondaryLight}" Click="cleancache_click"
|
||||||
Click="cleancache_click" Content="{ll:Str 清理缓存}" ToolTip="{ll:Str '清理缓存的动画,声音文件'}" />
|
Content="{ll:Str 清理缓存}" ToolTip="{ll:Str '清理缓存的动画,声音文件'}" />
|
||||||
<TextBlock Margin="0,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"
|
<TextBlock Margin="0,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"
|
||||||
Background="{x:Null}" TextWrapping="Wrap">
|
Background="{x:Null}" TextWrapping="Wrap">
|
||||||
<Run FontSize="18" FontWeight="Bold" Text="{ll:Str 桌宠多开}" /> <LineBreak />
|
<Run FontSize="18" FontWeight="Bold" Text="{ll:Str 桌宠多开}" /> <LineBreak />
|
||||||
@ -429,9 +430,10 @@
|
|||||||
Background="{DynamicResource SecondaryLight}" Content="{ll:Str 打开}"
|
Background="{DynamicResource SecondaryLight}" Content="{ll:Str 打开}"
|
||||||
ToolTip="{ll:Str 打开当前选择的多开存档}" VerticalAlignment="Top" Height="25"
|
ToolTip="{ll:Str 打开当前选择的多开存档}" VerticalAlignment="Top" Height="25"
|
||||||
Click="btn_muti_open_click" />
|
Click="btn_muti_open_click" />
|
||||||
<Button x:Name="btn_mutidel" Grid.Row="1" Grid.Column="3" Margin="5" Padding="1" pu:ButtonHelper.CornerRadius="4"
|
<Button x:Name="btn_mutidel" Grid.Row="1" Grid.Column="3" Margin="5" Padding="1"
|
||||||
Background="{DynamicResource SecondaryLight}" Content="{ll:Str 删除}"
|
pu:ButtonHelper.CornerRadius="4" Background="{DynamicResource SecondaryLight}"
|
||||||
ToolTip="{ll:Str 删除当前选择的多开存档}" VerticalAlignment="Bottom" Height="25" Click="btn_mutidel_Click" />
|
Content="{ll:Str 删除}" ToolTip="{ll:Str 删除当前选择的多开存档}" VerticalAlignment="Bottom"
|
||||||
|
Height="25" Click="btn_mutidel_Click" />
|
||||||
<ListBox x:Name="LBHave" Grid.Row="1" Grid.Column="2" Margin="1,2,1,2"
|
<ListBox x:Name="LBHave" Grid.Row="1" Grid.Column="2" Margin="1,2,1,2"
|
||||||
pu:ListBoxHelper.CornerRadius="4" BorderBrush="{DynamicResource DARKPrimary}"
|
pu:ListBoxHelper.CornerRadius="4" BorderBrush="{DynamicResource DARKPrimary}"
|
||||||
BorderThickness="2" MinHeight="66"
|
BorderThickness="2" MinHeight="66"
|
||||||
|
@ -147,6 +147,19 @@ namespace VPet_Simulator.Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var v in mw.Fonts)
|
||||||
|
{
|
||||||
|
FontBox.Items.Add(v.Name);
|
||||||
|
}
|
||||||
|
FontBox.SelectedItem = mw.Set.Font;
|
||||||
|
|
||||||
|
foreach (var v in mw.Themes)
|
||||||
|
{
|
||||||
|
ThemeBox.Items.Add(v.Name);
|
||||||
|
}
|
||||||
|
if (mw.Theme != null)
|
||||||
|
ThemeBox.SelectedItem = mw.Theme.Name;
|
||||||
|
|
||||||
VoiceCatchSilder.Value = mw.Set.MusicCatch;
|
VoiceCatchSilder.Value = mw.Set.MusicCatch;
|
||||||
VoiceMaxSilder.Value = mw.Set.MusicMax;
|
VoiceMaxSilder.Value = mw.Set.MusicMax;
|
||||||
|
|
||||||
@ -476,12 +489,20 @@ namespace VPet_Simulator.Windows
|
|||||||
|
|
||||||
private void ThemeBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void ThemeBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (!AllowChange)
|
||||||
|
return;
|
||||||
|
string str = (string)(ThemeBox.SelectedItem);
|
||||||
|
mw.LoadTheme(str);
|
||||||
|
mw.Set.Theme = mw.Theme.xName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FontBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void FontBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (!AllowChange)
|
||||||
|
return;
|
||||||
|
string str = (string)(FontBox.SelectedItem);
|
||||||
|
mw.LoadFont(str);
|
||||||
|
mw.Set.Font = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CBAutoSave_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void CBAutoSave_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
20
VPet-Simulator.Windows/mod/0000_core/theme/default.lps
Normal file
20
VPet-Simulator.Windows/mod/0000_core/theme/default.lps
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
default#原版默认:|image#default:|
|
||||||
|
Primary#FF81d4fa:|
|
||||||
|
PrimaryLight#FFA3E2FF:|
|
||||||
|
PrimaryLighter#FFC1EBFF:|
|
||||||
|
PrimaryDark#FF5CBEEA:|
|
||||||
|
PrimaryDarker#FF3CA9DB:|
|
||||||
|
PrimaryText#FF000000:|
|
||||||
|
Secondary#FF90caf9:|
|
||||||
|
SecondaryLight#FFADD7F9:|
|
||||||
|
SecondaryLighter#FFCBE4F9:|
|
||||||
|
SecondaryDark#FF6BB1E9:|
|
||||||
|
SecondaryDarker#FF4999DA:|
|
||||||
|
SecondaryText#FF000000:|
|
||||||
|
DARKPrimary#FF039be5:|
|
||||||
|
DARKPrimaryLight#FF1FA9EC:|
|
||||||
|
DARKPrimaryLighter#FF3DB8F4:|
|
||||||
|
DARKPrimaryDark#FF0290D5:|
|
||||||
|
DARKPrimaryDarker#FF0286C6:|
|
||||||
|
DARKPrimaryText#FFffffff:|
|
||||||
|
ShadowColor#90CAF9:|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
VPet-Simulator.Windows/mod/0000_core/theme/fonts/OPPOSans R.ttf
Normal file
BIN
VPet-Simulator.Windows/mod/0000_core/theme/fonts/OPPOSans R.ttf
Normal file
Binary file not shown.
BIN
VPet-Simulator.Windows/mod/0000_core/theme/fonts/凤凰点阵体 12px.ttf
Normal file
BIN
VPet-Simulator.Windows/mod/0000_core/theme/fonts/凤凰点阵体 12px.ttf
Normal file
Binary file not shown.
BIN
VPet-Simulator.Windows/mod/0000_core/theme/fonts/得意黑.ttf
Normal file
BIN
VPet-Simulator.Windows/mod/0000_core/theme/fonts/得意黑.ttf
Normal file
Binary file not shown.
20
VPet-Simulator.Windows/mod/0000_core/theme/prupe.lps
Normal file
20
VPet-Simulator.Windows/mod/0000_core/theme/prupe.lps
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
prupe#混色紫:|image#default:|
|
||||||
|
Primary#FF64b5f6:|
|
||||||
|
PrimaryLight#FF90caf9:|
|
||||||
|
PrimaryLighter#FFbbdefb:|
|
||||||
|
PrimaryDark#FF7e57c2:|
|
||||||
|
PrimaryDarker#FF7b1fa2:|
|
||||||
|
PrimaryText#FF000000:|
|
||||||
|
Secondary#FF7986cb:|
|
||||||
|
SecondaryLight#FF9fa8da:|
|
||||||
|
SecondaryLighter#FFc5cae9:|
|
||||||
|
SecondaryDark#FF512da8:|
|
||||||
|
SecondaryDarker#FF4527a0:|
|
||||||
|
SecondaryText#FF000000:|
|
||||||
|
DARKPrimary#FF4a148c:|
|
||||||
|
DARKPrimaryLight#FF6a1b9a:|
|
||||||
|
DARKPrimaryLighter#FF9c4dcc:|
|
||||||
|
DARKPrimaryDark#FF3a106c:|
|
||||||
|
DARKPrimaryDarker#FF12005e:|
|
||||||
|
DARKPrimaryText#FFffffff:|
|
||||||
|
ShadowColor#FF7986cb:|
|
20
VPet-Simulator.Windows/mod/0000_core/theme/vup.lps
Normal file
20
VPet-Simulator.Windows/mod/0000_core/theme/vup.lps
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
vup#默认虚拟主播风格:|image#vup:|
|
||||||
|
Primary#FF81d4fa:|
|
||||||
|
PrimaryLight#FFA3E2FF:|
|
||||||
|
PrimaryLighter#FFC1EBFF:|
|
||||||
|
PrimaryDark#FF5CBEEA:|
|
||||||
|
PrimaryDarker#FF3CA9DB:|
|
||||||
|
PrimaryText#FF000000:|
|
||||||
|
Secondary#FF90caf9:|
|
||||||
|
SecondaryLight#FFADD7F9:|
|
||||||
|
SecondaryLighter#FFCBE4F9:|
|
||||||
|
SecondaryDark#FF6BB1E9:|
|
||||||
|
SecondaryDarker#FF4999DA:|
|
||||||
|
SecondaryText#FF000000:|
|
||||||
|
DARKPrimary#FF039be5:|
|
||||||
|
DARKPrimaryLight#FF1FA9EC:|
|
||||||
|
DARKPrimaryLighter#FF3DB8F4:|
|
||||||
|
DARKPrimaryDark#FF0290D5:|
|
||||||
|
DARKPrimaryDarker#FF0286C6:|
|
||||||
|
DARKPrimaryText#FFffffff:|
|
||||||
|
ShadowColor#90CAF9:|
|
Loading…
x
Reference in New Issue
Block a user