mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-20 19:57:12 +01:00
Improve Color4 method names to be more consistent with the rest of the basic types.
This commit is contained in:
parent
c8d2e9249a
commit
76bef3d87c
@ -534,23 +534,6 @@ void Color4::SetScalar(Value ns)
|
||||
a = ns;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Color4::SetColor3Ex(Value nr, Value ng, Value nb)
|
||||
{
|
||||
r = nr;
|
||||
g = ng;
|
||||
b = nb;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Color4::SetColor4Ex(Value nr, Value ng, Value nb, Value na)
|
||||
{
|
||||
r = nr;
|
||||
g = ng;
|
||||
b = nb;
|
||||
a = na;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Color4::SetColor3(const Color3 & c)
|
||||
{
|
||||
@ -560,6 +543,14 @@ void Color4::SetColor3(const Color3 & c)
|
||||
a = 0;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Color4::SetColor3Ex(Value nr, Value ng, Value nb)
|
||||
{
|
||||
r = nr;
|
||||
g = ng;
|
||||
b = nb;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Color4::SetColor4(const Color4 & c)
|
||||
{
|
||||
@ -569,6 +560,15 @@ void Color4::SetColor4(const Color4 & c)
|
||||
a = c.a;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Color4::SetColor4Ex(Value nr, Value ng, Value nb, Value na)
|
||||
{
|
||||
r = nr;
|
||||
g = ng;
|
||||
b = nb;
|
||||
a = na;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Color4::SetStr(CSStr str, SQChar delim)
|
||||
{
|
||||
@ -793,10 +793,10 @@ void Register_Color4(HSQUIRRELVM vm)
|
||||
.Prop(_SC("ARGB"), &Color4::GetARGB, &Color4::SetARGB)
|
||||
// Member Methods
|
||||
.Func(_SC("SetScalar"), &Color4::SetScalar)
|
||||
.Func(_SC("SetColor3Ex"), &Color4::SetColor3Ex)
|
||||
.Func(_SC("SetColor4Ex"), &Color4::SetColor4Ex)
|
||||
.Func(_SC("SetColor3"), &Color4::SetColor3)
|
||||
.Func(_SC("SetColor3Ex"), &Color4::SetColor3Ex)
|
||||
.Func(_SC("SetColor4"), &Color4::SetColor4)
|
||||
.Func(_SC("SetColor4Ex"), &Color4::SetColor4Ex)
|
||||
.Func(_SC("SetStr"), &Color4::SetStr)
|
||||
.Func(_SC("SetName"), &Color4::SetName)
|
||||
.Func(_SC("Clear"), &Color4::Clear)
|
||||
|
@ -384,26 +384,26 @@ struct Color4
|
||||
*/
|
||||
void SetScalar(Value ns);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set all components to the specified values.
|
||||
*/
|
||||
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 an opaque color.
|
||||
*/
|
||||
void SetColor3(const Color3 & c);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set all components to the specified values.
|
||||
*/
|
||||
void SetColor3Ex(Value nr, Value ng, Value nb);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Copy the values from another instance of this type.
|
||||
*/
|
||||
void SetColor4(const Color4 & c);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set all components to the specified values.
|
||||
*/
|
||||
void SetColor4Ex(Value nr, Value ng, Value nb, Value na);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Set the values extracted from the specified string using the specified delimiter.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user