mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-14 23:38:15 +00:00
Added new functions
SetWindowTitle() GetExtension()
This commit is contained in:
18
src/core.c
18
src/core.c
@@ -659,6 +659,14 @@ void SetWindowIcon(Image image)
|
||||
#endif
|
||||
}
|
||||
|
||||
// Set title for window (only PLATFORM_DESKTOP)
|
||||
void SetWindowTitle(const char *title)
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
glfwSetWindowTitle(window, title);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Set window position on screen (windowed mode)
|
||||
void SetWindowPosition(int x, int y)
|
||||
{
|
||||
@@ -1152,6 +1160,16 @@ bool IsFileExtension(const char *fileName, const char *ext)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Get the extension for a filename
|
||||
const char *GetExtension(const char *fileName)
|
||||
{
|
||||
const char *dot = strrchr(fileName, '.');
|
||||
|
||||
if (!dot || dot == fileName) return "";
|
||||
|
||||
return (dot + 1);
|
||||
}
|
||||
|
||||
// Get directory for a given fileName (with path)
|
||||
const char *GetDirectoryPath(const char *fileName)
|
||||
{
|
||||
|
Reference in New Issue
Block a user