mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 00:37:58 +03:00
Make color getters const.
This commit is contained in:
parent
9b31649ada
commit
3060fb85c0
2 changed files with 8 additions and 8 deletions
|
@ -77,7 +77,7 @@ GameScriptColor::operator Vector4() const
|
||||||
return Vector4{ float(r), float(g), float(b), float(a) };
|
return Vector4{ float(r), float(g), float(b), float(a) };
|
||||||
}
|
}
|
||||||
|
|
||||||
byte GameScriptColor::GetR()
|
byte GameScriptColor::GetR() const
|
||||||
{
|
{
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ void GameScriptColor::SetR(byte v)
|
||||||
r = std::clamp<byte>(v, 0, 255);
|
r = std::clamp<byte>(v, 0, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
byte GameScriptColor::GetG()
|
byte GameScriptColor::GetG() const
|
||||||
{
|
{
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ void GameScriptColor::SetG(byte v)
|
||||||
g = std::clamp<byte>(v, 0, 255);
|
g = std::clamp<byte>(v, 0, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
byte GameScriptColor::GetB()
|
byte GameScriptColor::GetB() const
|
||||||
{
|
{
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ void GameScriptColor::SetB(byte v)
|
||||||
b = std::clamp<byte>(v, 0, 255);
|
b = std::clamp<byte>(v, 0, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
byte GameScriptColor::GetA()
|
byte GameScriptColor::GetA() const
|
||||||
{
|
{
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,13 +22,13 @@ public:
|
||||||
operator Vector3() const;
|
operator Vector3() const;
|
||||||
operator Vector4() const;
|
operator Vector4() const;
|
||||||
|
|
||||||
byte GetR();
|
byte GetR() const;
|
||||||
void SetR(byte v);
|
void SetR(byte v);
|
||||||
byte GetG();
|
byte GetG() const;
|
||||||
void SetG(byte v);
|
void SetG(byte v);
|
||||||
byte GetB();
|
byte GetB() const;
|
||||||
void SetB(byte v);
|
void SetB(byte v);
|
||||||
byte GetA();
|
byte GetA() const;
|
||||||
void SetA(byte v);
|
void SetA(byte v);
|
||||||
|
|
||||||
std::string ToString() const;
|
std::string ToString() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue