chore: 界面添加支援道具名称提示,传入内容为空白时自动切换为”荧光棒“

This commit is contained in:
uye
2024-06-06 14:44:42 +08:00
parent 1102d933c8
commit 09baaf2c20
3 changed files with 7 additions and 1 deletions

View File

@@ -74,8 +74,12 @@ bool asst::ReclamationTask::set_params(const json::value& params)
}
m_reclamation_task_ptr = init_reclamation_tales_within_the_sand(enable_ex);
auto ptr = std::static_pointer_cast<tales_within_the_sand_task>(m_reclamation_task_ptr);
if (const std::string product = params.get("product", ""); !product.empty())
if (const std::string product = params.get("product", "荧光棒"); !product.empty()) {
Task.get<OcrTaskInfo>("Reclamation2ExClickProduct")->text = { product };
}
else {
Task.get<OcrTaskInfo>("Reclamation2ExClickProduct")->text = { "荧光棒" };
}
break;
}
default:

View File

@@ -818,5 +818,6 @@
<system:String x:Key="ReclamationBePatient">牛牛,我太想进步了!你看,又急</system:String>
<system:String x:Key="Reclamation2ExEnable">通过制造刷点数</system:String>
<system:String x:Key="Reclamation2ExProductTip">支援道具名称</system:String>
<system:String x:Key="Reclamation2ExProductPlaceholder">荧光棒</system:String>
<!-- !Reclamation -->
</ResourceDictionary>

View File

@@ -33,6 +33,7 @@
IsEnabled="{c:Binding Idle}" />
<TextBox
hc:InfoElement.Title="{DynamicResource Reclamation2ExProductTip}"
hc:InfoElement.Placeholder="{DynamicResource Reclamation2ExProductPlaceholder}"
Style="{StaticResource TextBoxExtend}"
Margin="0,10"
VerticalContentAlignment="Center"