X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Fvaluenode_compare.cpp;h=627d84366ad8791267c5a2869b7e8aeffb31c79d;hb=dbc88fd05c8d29849d2e6227d23605508eb188ae;hp=68c34278977991f4b6c84c1363693bd9fd1abd28;hpb=a095981e18cc37a8ecc7cd237cc22b9c10329264;p=synfig.git diff --git a/synfig-core/src/synfig/valuenode_compare.cpp b/synfig-core/src/synfig/valuenode_compare.cpp index 68c3427..627d843 100644 --- a/synfig-core/src/synfig/valuenode_compare.cpp +++ b/synfig-core/src/synfig/valuenode_compare.cpp @@ -54,6 +54,8 @@ using namespace synfig; ValueNode_Compare::ValueNode_Compare(const ValueBase &x): LinkableValueNode(x.get_type()) { + Vocab ret(get_children_vocab()); + set_children_vocab(ret); bool value(x.get(bool())); set_link("lhs", ValueNode_Const::create(Real(0))); @@ -195,3 +197,39 @@ ValueNode_Compare::check_type(ValueBase::Type type) { return type==ValueBase::TYPE_BOOL; } + +LinkableValueNode::Vocab +ValueNode_Compare::get_children_vocab_vfunc()const +{ + if(children_vocab.size()) + return children_vocab; + + LinkableValueNode::Vocab ret; + + ret.push_back(ParamDesc(ValueBase(),"lhs") + .set_local_name(_("LHS")) + .set_description(_("The left side of the comparison")) + ); + + ret.push_back(ParamDesc(ValueBase(),"rhs") + .set_local_name(_("RHS")) + .set_description(_("The right side of the comparison")) + ); + + ret.push_back(ParamDesc(ValueBase(),"greater") + .set_local_name(_("Greater")) + .set_description(_("When checked, returns true if LHS > RHS")) + ); + + ret.push_back(ParamDesc(ValueBase(),"equal") + .set_local_name(_("Equal")) + .set_description(_("When checked, returns true if LHS = RHS")) + ); + + ret.push_back(ParamDesc(ValueBase(),"less") + .set_local_name(_("Less")) + .set_description(_("When checked, returns true if LHS < RHS")) + ); + + return ret; +}