Skip to content

Commit f783c8d

Browse files
committed
Update definitions
1 parent b20937f commit f783c8d

File tree

5 files changed

+33
-12
lines changed

5 files changed

+33
-12
lines changed

include/Image.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace raylib {
3131
Image(::Texture2D texture) {
3232
set(::GetTextureData(texture));
3333
}
34-
Image(int width, int height, Color color = raylib::Color::RayWhite) {
34+
Image(int width, int height, Color color = WHITE) {
3535
set(::GenImageColor(width, height, color));
3636
}
3737

include/Texture2D.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ namespace raylib {
7979
return *this;
8080
}
8181

82+
inline Texture2D& UpdateRec(Rectangle rec, const void *pixels) {
83+
UpdateTextureRec(*this, rec, pixels);
84+
return *this;
85+
}
86+
8287
inline Image GetTextureData() {
8388
return ::GetTextureData(*this);
8489
}
@@ -137,6 +142,11 @@ namespace raylib {
137142
return *this;
138143
}
139144

145+
inline Texture2D& DrawTiled(Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, float scale, Color tint = WHITE) {
146+
::DrawTextureTiled(*this, sourceRec, destRec, origin, rotation, scale, tint);
147+
return *this;
148+
}
149+
140150
inline Texture2D& SetMaterialTexture(Material *material, int mapType) {
141151
::SetMaterialTexture(material, mapType, *this);
142152
return *this;

include/Vector2.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,16 @@ namespace raylib {
100100
return Vector2Divide(*this, vector2);
101101
}
102102

103-
Vector2 Divide(const float div) {
104-
this->x /= div;
105-
this->y /= div;
103+
Vector2& Divide(const float div) {
104+
x /= div;
105+
y /= div;
106106

107107
return *this;
108108
}
109109

110-
Vector2 operator/(const float div) {
111-
this->x /= div;
112-
this->y /= div;
110+
Vector2& operator/(const float div) {
111+
x /= div;
112+
y /= div;
113113

114114
return *this;
115115
}

include/Vector3.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ namespace raylib {
107107
return Vector3Divide(*this, vector3);
108108
}
109109

110-
Vector3 Divide(const float div) {
111-
this->x /= div;
112-
this->y /= div;
113-
this->z /= div;
110+
Vector3& Divide(const float div) {
111+
x /= div;
112+
y /= div;
113+
z /= div;
114114

115115
return *this;
116116
}

include/Window.hpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ namespace raylib {
4848
::CloseWindow();
4949
};
5050

51+
inline bool IsCursorOnScreen() {
52+
return ::IsCursorOnScreen();
53+
}
54+
5155
/**
5256
* Check if window has been initialized successfully
5357
*/
@@ -57,6 +61,9 @@ namespace raylib {
5761
inline bool IsMinimized() {
5862
return ::IsWindowMinimized();
5963
}
64+
inline bool IsFocused() {
65+
return ::IsWindowFocused();
66+
}
6067
inline bool IsResized() {
6168
return ::IsWindowResized();
6269
}
@@ -124,10 +131,14 @@ namespace raylib {
124131
return ::GetScreenHeight();
125132
}
126133

127-
inline Vector2 GetWindowPosition() {
134+
inline Vector2 GetPosition() {
128135
return ::GetWindowPosition();
129136
}
130137

138+
inline Vector2 GetScaleDPI() {
139+
return ::GetWindowScaleDPI();
140+
}
141+
131142
std::string GetMonitorName(int monitor) {
132143
return std::string(::GetMonitorName(monitor));
133144
}

0 commit comments

Comments
 (0)