mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-07-09 01:57:09 +02:00
Improve the Color3 registration code to avoid using overloads where not necessary.
Also restructured the registration code a bit.
This commit is contained in:
+16
-6
@@ -49,6 +49,11 @@ struct Color3
|
||||
*/
|
||||
Color3(Value rv, Value gv, Value bv);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Construct with individually specified red, green, blue and alpha colors.
|
||||
*/
|
||||
Color3(Value rv, Value gv, Value bv, Value av);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Copy constructor.
|
||||
*/
|
||||
@@ -377,32 +382,37 @@ struct Color3
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set all components to the specified scalar value.
|
||||
*/
|
||||
void Set(Value ns);
|
||||
void SetScalar(Value ns);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set all components to the specified values.
|
||||
*/
|
||||
void Set(Value nr, Value ng, Value nb);
|
||||
void SetColor3Ex(Value nr, Value ng, Value nb);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set all components to the specified values.
|
||||
*/
|
||||
void SetColor4Ex(Value nr, Value ng, Value nb, Value na);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Copy the values from another instance of this type.
|
||||
*/
|
||||
void Set(const Color3 & c);
|
||||
void SetColor3(const Color3 & c);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Copy the values from an opaque color.
|
||||
*/
|
||||
void Set(const Color4 & c);
|
||||
void SetColor4(const Color4 & c);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set the values extracted from the specified string using the specified delimiter.
|
||||
*/
|
||||
void Set(CSStr str, SQChar delim);
|
||||
void SetStr(CSStr str, SQChar delim);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set the values from the identified color.
|
||||
*/
|
||||
void SetCol(CSStr name);
|
||||
void SetName(CSStr name);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Get the component values packed inside an integer value.
|
||||
|
||||
Reference in New Issue
Block a user