aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/gamepadbutton/value/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/ru/web/api/gamepadbutton/value/index.html
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/ru/web/api/gamepadbutton/value/index.html')
-rw-r--r--files/ru/web/api/gamepadbutton/value/index.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/files/ru/web/api/gamepadbutton/value/index.html b/files/ru/web/api/gamepadbutton/value/index.html
new file mode 100644
index 0000000000..a1ccad261f
--- /dev/null
+++ b/files/ru/web/api/gamepadbutton/value/index.html
@@ -0,0 +1,51 @@
+---
+title: GamepadButton.value
+slug: Web/API/GamepadButton/value
+translation_of: Web/API/GamepadButton/value
+---
+<p>{{APIRef("Gamepad API")}}</p>
+
+<p>Свойство <code><strong>GamepadButton.value</strong></code>  интерфейса {{domxref("GamepadButton")}} возвращает состояние аналоговой клавиши геймпада, такой, как, например триггеры. </p>
+
+<p>Пердставляет собой дробное число в диапазоне  <code>0.0</code> — <code>1.0</code>,  где <code>0.0</code> показывает, что кнопка не нажата, а 1.0 - что нажата полностью.</p>
+
+<h2 id="Синтаксис">Синтаксис</h2>
+
+<pre class="syntaxbox notranslate"><span class="idlInterface" id="idl-def-GamepadButton"><span class="idlAttribute"> readonly attribute <span class="idlAttrType">double</span> <span class="idlAttrName">value</span>;</span></span></pre>
+
+<h2 id="Пример">Пример</h2>
+
+<pre class="brush: js notranslate">var gp = navigator.getGamepads()[0];
+
+if(gp.buttons[0].value &gt; 0) {
+ // respond to analog button being pressed in
+} </pre>
+
+<h2 id="Значение">Значение</h2>
+
+<p> {{domxref("double")}}.</p>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName("Gamepad", "#dom-gamepadbutton-value", "GamepadButton.value")}}</td>
+ <td>{{Spec2("Gamepad")}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<p>{{Compat("api.GamepadButton.value")}}</p>
+
+<h2 id="См._также">См. также</h2>
+
+<p><a href="/en-US/docs/Web/Guide/API/Gamepad">Using the Gamepad API</a></p>