Gui.isGpuRenderingEnabled: Difference between revisions
(Created page with "Function to return whether the player has activated the setting 'Acclerated CEF rendering'. ==Syntax== <syntaxhighlight lang="javascript">mp.gui.isGpuRenderingEnabled();</synt...") |
(Property still present) |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | |||
==Syntax== | {{ClientsideJsProperty}} | ||
<syntaxhighlight lang="javascript">mp.gui.isGpuRenderingEnabled | Read-only property which returns whether the player has enabled the 'Acclerated CEF rendering' setting in the launcher. | ||
===Return value=== | |||
{{JSContainer| | |||
== Syntax == | |||
<syntaxhighlight lang="javascript">mp.gui.isGpuRenderingEnabled;</syntaxhighlight> | |||
=== Return value === | |||
* {{RageType|Boolean}} | * {{RageType|Boolean}} | ||
==Example== | ==Example== | ||
{{ClientsideCode| | {{ClientsideCode| | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
mp.gui.chat.push("GPU Rendering Enabled: " + | let isGpuRenderingEnabled = mp.gui.isGpuRenderingEnabled; | ||
mp.gui.chat.push("GPU Rendering Enabled: " + isGpuRenderingEnabled); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
}} | }} | ||
==See also== | ==See also== | ||
{{Gui_definition_c}} | {{Gui_definition_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Latest revision as of 13:35, 25 February 2023
Client-Side Property
Read-only property which returns whether the player has enabled the 'Acclerated CEF rendering' setting in the launcher.
JavaScript Syntax
Syntax
mp.gui.isGpuRenderingEnabled;
Return value
- Boolean
Example
Client-Side
let isGpuRenderingEnabled = mp.gui.isGpuRenderingEnabled;
mp.gui.chat.push("GPU Rendering Enabled: " + isGpuRenderingEnabled);