Skip to content

Commit 9836434

Browse files
committed
Added a getter and setter for the color in Sprite
1 parent 10f0824 commit 9836434

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

include/ProtoZed/Components/Sprite.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,23 @@ namespace PZ
4949

5050
const ImageAsset *GetImageAsset() const;
5151

52-
inline const Vector2f GetCenter() const
52+
inline const Vector2f &GetCenter() const
5353
{
5454
return center;
5555
}
5656
inline void SetCenter(const Vector2f &newCenter)
5757
{
5858
center = newCenter;
5959
}
60+
61+
inline const Color &GetColor() const
62+
{
63+
return color;
64+
}
65+
inline void SetColor(const Color &newColor)
66+
{
67+
color = newColor;
68+
}
6069

6170
inline const Vector2f &GetRegionOffset() const
6271
{

include/ProtoZed/PropertyList.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace PZ
3333

3434
class PropertyList
3535
{
36-
friend class PropertyBase;
36+
friend class PropertyBase; // For access to PropertyUpdated()
3737

3838
public:
3939
PropertyList();

0 commit comments

Comments
 (0)