We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 243dc92 commit abb9dfbCopy full SHA for abb9dfb
1 file changed
code/scripting/api/objs/color.cpp
@@ -69,5 +69,19 @@ ADE_VIRTVAR(Alpha,
69
return colorVarHelper(L, &color::alpha);
70
}
71
72
+ADE_FUNC(copy,
73
+ l_Color,
74
+ nullptr,
75
+ "Returns a copy of the color",
76
+ "color",
77
+ "The copy, or null color on failure")
78
+{
79
+ color* clr = nullptr;
80
+ if (!ade_get_args(L, "o", l_Color.GetPtr(&clr)))
81
+ return ade_set_error(L, "o", l_Color.Set(color()));
82
+
83
+ return ade_set_args(L, "o", l_Color.Set(*clr));
84
+}
85
86
} // namespace api
87
} // namespace scripting
0 commit comments