mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Fixed the color set by love.graphics.setColor not being restored properly when love.graphics.pop is called after love.graphics.push("all").
This commit is contained in:
@@ -44,11 +44,26 @@ struct ColorT
|
||||
a = a_;
|
||||
}
|
||||
|
||||
bool operator==(const ColorT<T> &other) const;
|
||||
bool operator!=(const ColorT<T> &other) const;
|
||||
|
||||
ColorT<T> operator+=(const ColorT<T> &other);
|
||||
ColorT<T> operator*=(T s);
|
||||
ColorT<T> operator/=(T s);
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
bool ColorT<T>::operator==(const ColorT<T> &other) const
|
||||
{
|
||||
return r == other.r && g == other.g && b == other.b && a == other.a;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool ColorT<T>::operator!=(const ColorT<T> &other) const
|
||||
{
|
||||
return !(operator==(other));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ColorT<T> ColorT<T>::operator+=(const ColorT<T> &other)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user