add is_default script function

This commit is contained in:
GenevensiS
2026-04-19 19:06:52 +02:00
parent 17dd3cf407
commit d782e4851c
22 changed files with 93 additions and 13 deletions
+8
View File
@@ -187,6 +187,13 @@ SCRIPT_FUNCTION_DEPENDENCIES(combined_editor) {
}
}
return dependency_dummy;
}
// ----------------------------------------------------------------------------- : Values
SCRIPT_FUNCTION(is_default) {
SCRIPT_PARAM_C(ValueP,input);
SCRIPT_RETURN(input->isDefault());
}
// ----------------------------------------------------------------------------- : Choice values
@@ -389,6 +396,7 @@ SCRIPT_FUNCTION(count_chosen) {
void init_script_editor_functions(Context& ctx) {
ctx.setVariable(_("forward_editor"), script_combined_editor); // compatability
ctx.setVariable(_("combined_editor"), script_combined_editor);
ctx.setVariable(_("is_default"), script_is_default);
ctx.setVariable(_("primary_choice"), script_primary_choice);
ctx.setVariable(_("chosen"), script_chosen);
ctx.setVariable(_("count_chosen"), script_count_chosen);