1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-01-31 09:57:14 +01:00

Improve Color3 method names to be more consistent with the rest of the basic types.

This commit is contained in:
Sandu Liviu Catalin 2016-07-25 00:10:17 +03:00
parent 484923790a
commit c8d2e9249a
2 changed files with 28 additions and 28 deletions

View File

@ -508,22 +508,6 @@ void Color3::SetScalar(Value ns)
b = ns;
}
// ------------------------------------------------------------------------------------------------
void Color3::SetColor3Ex(Value nr, Value ng, Value nb)
{
r = nr;
g = ng;
b = nb;
}
// ------------------------------------------------------------------------------------------------
void Color3::SetColor4Ex(Value nr, Value ng, Value nb, Value /*na*/)
{
r = nr;
g = ng;
b = nb;
}
// ------------------------------------------------------------------------------------------------
void Color3::SetColor3(const Color3 & c)
{
@ -532,6 +516,14 @@ void Color3::SetColor3(const Color3 & c)
b = c.b;
}
// ------------------------------------------------------------------------------------------------
void Color3::SetColor3Ex(Value nr, Value ng, Value nb)
{
r = nr;
g = ng;
b = nb;
}
// ------------------------------------------------------------------------------------------------
void Color3::SetColor4(const Color4 & c)
{
@ -540,6 +532,14 @@ void Color3::SetColor4(const Color4 & c)
b = c.b;
}
// ------------------------------------------------------------------------------------------------
void Color3::SetColor4Ex(Value nr, Value ng, Value nb, Value /*na*/)
{
r = nr;
g = ng;
b = nb;
}
// ------------------------------------------------------------------------------------------------
void Color3::SetStr(CSStr str, SQChar delim)
{
@ -746,10 +746,10 @@ void Register_Color3(HSQUIRRELVM vm)
.Prop(_SC("ARGB"), &Color3::GetARGB, &Color3::SetARGB)
// Member Methods
.Func(_SC("SetScalar"), &Color3::SetScalar)
.Func(_SC("SetColor3Ex"), &Color3::SetColor3Ex)
.Func(_SC("SetColor4Ex"), &Color3::SetColor4Ex)
.Func(_SC("SetColor3"), &Color3::SetColor3)
.Func(_SC("SetColor3Ex"), &Color3::SetColor3Ex)
.Func(_SC("SetColor4"), &Color3::SetColor4)
.Func(_SC("SetColor4Ex"), &Color3::SetColor4Ex)
.Func(_SC("SetStr"), &Color3::SetStr)
.Func(_SC("SetName"), &Color3::SetName)
.Func(_SC("Clear"), &Color3::Clear)

View File

@ -384,26 +384,26 @@ struct Color3
*/
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 another instance of this type.
*/
void SetColor3(const Color3 & c);
/* --------------------------------------------------------------------------------------------
* Set all components to the specified values.
*/
void SetColor3Ex(Value nr, Value ng, Value nb);
/* --------------------------------------------------------------------------------------------
* Copy the values from an opaque color.
*/
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.
*/