forked from Mirrors/openclonk
Rename option default value function property to DefaultValueFunction
It was "Get" and later "Set", which was always a bit confusing.console-destruction
parent
3b7e36abd8
commit
31121d682c
|
@ -251,9 +251,9 @@ func Definition(def)
|
|||
ID = new Evaluator.Definition { Name="$ID$", EditorHelp="$FindObjectsIDHelp$", EmptyName="$Any$", Priority=51 },
|
||||
Area = { Name="$SearchArea$", EditorHelp="$SearchAreaHelp$", Type="enum", OptionKey="Function", Priority=41, Options=[
|
||||
{ Name="$SearchAreaWholeMap$", EditorHelp="$SearchAreaWholeMapHelp$" },
|
||||
{ Name="$SearchAreaInRect$", EditorHelp="$SearchAreaInRectHelp$", Value={ Function="InRect" }, Get=def.GetDefaultRect, ValueKey="Area", Delegate={ Type="rect", Name="$Rectangle$", Relative=false, Color=0xffff00 } },
|
||||
{ Name="$SearchAreaAtRect$", EditorHelp="$SearchAreaAtRectHelp$", Value={ Function="AtRect" }, Get=def.GetDefaultRect, ValueKey="Area", Delegate={ Type="rect", Name="$Rectangle$", Relative=false, Color=0xffff80 } },
|
||||
{ Name="$SearchAreaCircle$", EditorHelp="$SearchAreaCircleHelp$", Value={ Function="Circle" }, Get=def.GetDefaultCircle, ValueKey="Area", Delegate={ Type="circle", Name="$Circle$", Relative=false, CanMoveCenter=true, Color=0xff00ff } },
|
||||
{ Name="$SearchAreaInRect$", EditorHelp="$SearchAreaInRectHelp$", Value={ Function="InRect" }, DefaultValueFunction=def.GetDefaultRect, ValueKey="Area", Delegate={ Type="rect", Name="$Rectangle$", Relative=false, Color=0xffff00 } },
|
||||
{ Name="$SearchAreaAtRect$", EditorHelp="$SearchAreaAtRectHelp$", Value={ Function="AtRect" }, DefaultValueFunction=def.GetDefaultRect, ValueKey="Area", Delegate={ Type="rect", Name="$Rectangle$", Relative=false, Color=0xffff80 } },
|
||||
{ Name="$SearchAreaCircle$", EditorHelp="$SearchAreaCircleHelp$", Value={ Function="Circle" }, DefaultValueFunction=def.GetDefaultCircle, ValueKey="Area", Delegate={ Type="circle", Name="$Circle$", Relative=false, CanMoveCenter=true, Color=0xff00ff } },
|
||||
{ Name="$SearchAreaNearPosition$", EditorHelp="$SearchAreaNearPositionHelp$", Value={ Function="NearPosition", Parameters={Radius=25} }, ValueKey="Parameters", Delegate={ Type="proplist", Display="({{Position}}, {{Radius}})", EditorProps = {
|
||||
Position = new Evaluator.Position { EditorHelp="$SearchAreaNearPositionPositionHelp$"},
|
||||
Radius = { Type="circle", Relative=true, Name="$Radius$", Color=0xff80ff }
|
||||
|
@ -502,7 +502,7 @@ public func AddEvaluator(string eval_type, string group, name, string help, stri
|
|||
default_val = Call(default_get, nil, {Function=identifier});
|
||||
}
|
||||
default_val.Function = identifier;
|
||||
var action_def = { Name=name, ShortName=short_name, EditorHelp=help, Group=group, Value=default_val, Delegate=delegate, Get=default_get }, n;
|
||||
var action_def = { Name=name, ShortName=short_name, EditorHelp=help, Group=group, Value=default_val, Delegate=delegate, DefaultValueFunction=default_get }, n;
|
||||
if (delegate)
|
||||
{
|
||||
if (delegate.EditorProps || delegate.Elements)
|
||||
|
|
|
@ -924,7 +924,7 @@ C4PropertyDelegateEnum::C4PropertyDelegateEnum(const C4PropertyDelegateFactory *
|
|||
if (option.value.GetType() == C4V_Nil && empty_name) option.name = empty_name.Get();
|
||||
option.short_name = props->GetPropertyStr(P_ShortName);
|
||||
if (!option.short_name) option.short_name = option.name.Get();
|
||||
props->GetProperty(P_Set, &option.value_function);
|
||||
props->GetProperty(P_DefaultValueFunction, &option.value_function);
|
||||
option.type = C4V_Type(props->GetPropertyInt(P_Type, C4V_Any));
|
||||
option.option_key = props->GetPropertyStr(P_OptionKey);
|
||||
if (!option.option_key) option.option_key = default_option_key;
|
||||
|
|
|
@ -258,6 +258,7 @@ C4StringTable::C4StringTable()
|
|||
P[P_OptionKey] = "OptionKey";
|
||||
P[P_ValueKey] = "ValueKey";
|
||||
P[P_Value] = "Value";
|
||||
P[P_DefaultValueFunction] = "DefaultValueFunction";
|
||||
P[P_Delegate] = "Delegate";
|
||||
P[P_Min] = "Min";
|
||||
P[P_Max] = "Max";
|
||||
|
|
|
@ -482,6 +482,7 @@ enum C4PropertyName
|
|||
P_OptionKey,
|
||||
P_ValueKey,
|
||||
P_Value,
|
||||
P_DefaultValueFunction,
|
||||
P_Delegate,
|
||||
P_Min,
|
||||
P_Max,
|
||||
|
|
Loading…
Reference in New Issue