mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-07 03:48:15 +00:00
Adds SetWindowOpacity() implementation for PLATFORM_WEB (#4403)
This commit is contained in:
@@ -673,7 +673,9 @@ void SetWindowSize(int width, int height)
|
|||||||
// Set window opacity, value opacity is between 0.0 and 1.0
|
// Set window opacity, value opacity is between 0.0 and 1.0
|
||||||
void SetWindowOpacity(float opacity)
|
void SetWindowOpacity(float opacity)
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_WARNING, "SetWindowOpacity() not available on target platform");
|
if (opacity >= 1.0f) opacity = 1.0f;
|
||||||
|
else if (opacity <= 0.0f) opacity = 0.0f;
|
||||||
|
EM_ASM({ document.getElementById('canvas').style.opacity = $0; }, opacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set window focused
|
// Set window focused
|
||||||
|
Reference in New Issue
Block a user