---
metadata:
  - name: generator
    content: Diplodoc Platform v5.66.0
alternate:
  - https://yandex.com.tr/dev/games/doc/en/sdk/defold/events.md
  - https://yandex.com.tr/dev/games/doc/hi/sdk/defold/events.md
  - https://yandex.com.tr/dev/games/doc/ko/sdk/defold/events.md
  - https://yandex.com.tr/dev/games/doc/ru/sdk/defold/events.md
  - https://yandex.com.tr/dev/games/doc/tr/sdk/defold/events.md
  - https://yandex.com.tr/dev/games/doc/vi/sdk/defold/events.md
  - https://yandex.com.tr/dev/games/doc/zh/sdk/defold/events.md
  - href: https://yandex.com.tr/dev/games/doc/tr/sdk/defold/events.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.com.tr/dev/games/doc/tr/llms.txt?revision=r21993288
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/games/doc/tr/llms.txt?revision=r21993288

# Olaylar

<!-- source: tr/_includes/script-common.md -->
<!-- source: tr/_includes/script/index-js.md -->

<!-- endsource: tr/_includes/script/index-js.md -->

<!-- source: tr/_includes/script/requirements-js.md -->

<!-- endsource: tr/_includes/script/requirements-js.md -->

<!-- source: tr/_includes/script/image-modal-js.md -->

<!-- endsource: tr/_includes/script/image-modal-js.md -->
<!-- endsource: tr/_includes/script-common.md -->

Kullanıcının oyunda belirli düğmelere bastığında oluşan olayları takip edebilirsiniz.

Mevcut olaylar ve bunlarla çalışmak için yöntemler:

```lua showLineNumbers
ysdk = {
    on_event = function (eventName: "EXIT" | "HISTORY_BACK", listener: function): nil,
    dispatch_event = function (eventName: "EXIT" | "HISTORY_BACK", detail: table|nil): nil
}
```

## HISTORY_BACK {#history-back}

<!-- source: tr/_includes/sdk/common-with-plugins.md -->
{% note alert %}

Etkinlik yalnızca oyun bir televizyonda başlatıldıysa kullanılabilir.

{% endnote %}

**Back** düğmesine basılmasını izlemek için şu yöntemi kullanın:
<!-- endsource: tr/_includes/sdk/common-with-plugins.md -->

```lua showLineNumbers
ysdk.on_event("HISTORY_BACK", function (self)
    -- Kullanıcıya özel oyun iletişim penceresinin gösterilmesi
    -- oyundan çıkışı onayla, dahili ayarlara git, mağazaya git vb.
end)
```

## EXIT {#exit}

<!-- source: tr/_includes/sdk/common-with-plugins.md -->
Kullanıcı, **Back** düğmesine bastıktan sonra açılan özel iletişim kutusunda oyundan çıkmayı onayladıysa, oyun çıkış etkinliğini göndermelidir. Bunun için şu yöntemi kullanın:
<!-- endsource: tr/_includes/sdk/common-with-plugins.md -->

```lua
ysdk.dispatch_event("EXIT")
```

---


<!-- source: tr/_includes/sdk/button-git.md -->
<a href="https://github.com/yandex-games-plugins/defold">
  <span class="button">Depo</span>
</a>
<!-- endsource: tr/_includes/sdk/button-git.md -->
