This commit is contained in:
Hakoyu 2023-09-27 22:43:12 +08:00
parent de1e2d0da4
commit 82d7312041
6 changed files with 16 additions and 76 deletions

View File

@ -1,71 +1 @@
# VPet.Plugin.Demo
由开发者制作的桌宠插件案例
* DemoClock: 给桌宠添加一个时钟显示的功能
* EdgeTTS: 桌宠说话的时候附带语音,使用EdgeTTS
## VPet.Plugin.DemoClock
给桌宠添加一个时钟显示的功能,这算是代码嵌入类型MOD的DEMO
![democlock](democlock.png)
参考本软件即可编写自己的代码MOD
### 功能
给桌宠添加一个可以显示时间的钟表
* 支持倒计时
* 支持正计时
* 支持番茄钟 (工作/休息)
每次使用番茄钟完成工作,还可以获得相应时间的 [金钱] 奖励
### 相关截图
菜单栏设置
![image-20230411135459116](README.assets/image-20230411135459116.png)
鼠标移近时突出显示状态
![image-20230411134850372](README.assets/image-20230411134850372.png)
待机时状态
![image-20230411134857271](README.assets/image-20230411134857271.png)
倒计时状态
![image-20230411135128676](README.assets/image-20230411135128676.png)
番茄钟:工作状态
![image-20230411134933108](README.assets/image-20230411134933108.png)
时间到
![image-20230411135345438](README.assets/image-20230411135345438.png)
游戏设置窗口
![image-20230411134959369](README.assets/image-20230411134959369.png)
## VPet.Plugin.EdgeTTS
桌宠说话的时候附带语音,使用EdgeTTS
![edgetts](edgetts.png)
参考本软件即可编写自己的代码MOD
### 功能
让桌宠说话的时候说出来
* 支持自定义讲述人和语音语调语速等
### 相关截图
游戏设置窗口
![image-20230411134959369](README.assets/image-20230411134959369.png)
# VPet.ModMaker

View File

@ -18,7 +18,7 @@ public class FoodModel : I18nModel<I18nFoodModel>
public ObservableValue<string> Id { get; } = new();
public ObservableValue<string> DescriptionId { get; } = new();
public ObservableValue<string> Graph { get; } = new();
public ObservableValue<string> Graph { get; } = new("eat");
public ObservableValue<Food.FoodType> Type { get; } = new();
public ObservableValue<double> Strength { get; } = new();
public ObservableValue<double> StrengthFood { get; } = new();

View File

@ -70,7 +70,7 @@
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Label Content="{ll:Str 食物Id}" />
<Label Content="Id" />
<TextBox
Grid.Column="1"
pu:TextBoxHelper.Watermark="Id"
@ -86,7 +86,7 @@
<TextBox
Grid.Row="2"
Grid.Column="1"
pu:TextBoxHelper.Watermark="{ll:Str 动画名称(非必要)}"
pu:TextBoxHelper.Watermark="{ll:Str 绑定的动画名称(非必要)}"
Text="{Binding Food.Value.Graph.Value, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Row="3" Content="{ll:Str 食物名称}" />
<TextBox

View File

@ -95,6 +95,15 @@
<TextBlock Text="{ll:Str 食物类型}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn
Binding="{Binding Graph.Value}"
CanUserSort="True"
IsReadOnly="True"
SortMemberPath="Type.Value">
<DataGridTextColumn.Header>
<TextBlock Text="{ll:Str 指定动画}" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn
Binding="{Binding StrengthFood.Value}"
CanUserSort="True"

View File

@ -35,6 +35,7 @@
<Label Content="Id" />
<TextBox
Grid.Column="1"
pu:TextBoxHelper.Watermark="Id"
Style="{StaticResource TextBox_Wrap}"
Text="{Binding LowText.Value.Id.Value, UpdateSourceTrigger=PropertyChanged}" />
</Grid>

View File

@ -101,10 +101,10 @@
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Label Content="{ll:Str 模组Id}" />
<Label Content="Id" />
<TextBox
Grid.Column="1"
pu:TextBoxHelper.Watermark="{ll:Str 模组Id}"
pu:TextBoxHelper.Watermark="Id"
Text="{Binding ModInfo.Value.Id.Value}" />
<Label Grid.Row="1" Content="{ll:Str 作者}" />
<TextBox