# SU.Game.IsCurrentlyOnScreen

## SU.Game.IsCurrentlyOnScreen(guiElement)

Überprüft, ob das angegebene GUI-Element aktuell am Bildschirm des lokalen Spielers ist.

#### Notiz

* da das Lua-Skript nur direkt im Spiel und nicht in den Menüs davor läuft, machen nur alle "SU.GUIElements.**MENU**\_XXX" Variablen Sinn.

#### Parameter

* `guiElement`: [SU.GUIElements](/s4-lua-api-de/su-api-enums/su.guielements.md)

#### Rückgabewert

* 1: `guiElement` ist am Bildschirm
* 0: sonst / Fehler

#### Beispiel

```lua
local isOnScreen = SU.Game.IsCurrentlyOnScreen(SU.GUIElements.MENU_BUILDINGS_FOOD)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.settlers-united.com/s4-lua-api-de/su-library-functions/su.game/su.game.iscurrentlyonscreen.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
