mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Add Source:isPlaying
This commit is contained in:
@@ -210,6 +210,13 @@ int w_Source_isPaused(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int w_Source_isPlaying(lua_State *L)
|
||||||
|
{
|
||||||
|
Source *t = luax_checksource(L, 1);
|
||||||
|
luax_pushboolean(L, !t->isStopped() && !t->isPaused());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int w_Source_isStatic(lua_State *L)
|
int w_Source_isStatic(lua_State *L)
|
||||||
{
|
{
|
||||||
Source *t = luax_checksource(L, 1);
|
Source *t = luax_checksource(L, 1);
|
||||||
@@ -299,6 +306,7 @@ static const luaL_Reg functions[] =
|
|||||||
{ "isLooping", w_Source_isLooping },
|
{ "isLooping", w_Source_isLooping },
|
||||||
{ "isStopped", w_Source_isStopped },
|
{ "isStopped", w_Source_isStopped },
|
||||||
{ "isPaused", w_Source_isPaused },
|
{ "isPaused", w_Source_isPaused },
|
||||||
|
{ "isPlaying", w_Source_isPlaying },
|
||||||
{ "isStatic", w_Source_isStatic },
|
{ "isStatic", w_Source_isStatic },
|
||||||
|
|
||||||
{ "setVolumeLimits", w_Source_setVolumeLimits },
|
{ "setVolumeLimits", w_Source_setVolumeLimits },
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ int w_Source_setLooping(lua_State *L);
|
|||||||
int w_Source_isLooping(lua_State *L);
|
int w_Source_isLooping(lua_State *L);
|
||||||
int w_Source_isStopped(lua_State *L);
|
int w_Source_isStopped(lua_State *L);
|
||||||
int w_Source_isPaused(lua_State *L);
|
int w_Source_isPaused(lua_State *L);
|
||||||
|
int w_Source_isPlaying(lua_State *L);
|
||||||
int w_Source_isStatic(lua_State *L);
|
int w_Source_isStatic(lua_State *L);
|
||||||
int w_Source_setVolumeLimits(lua_State *L);
|
int w_Source_setVolumeLimits(lua_State *L);
|
||||||
int w_Source_getVolumeLimits(lua_State *L);
|
int w_Source_getVolumeLimits(lua_State *L);
|
||||||
|
|||||||
Reference in New Issue
Block a user