Difference between revisions of "Global Command: setWindowTitle"
From The Official Visionaire Studio: Adventure Game Engine Wiki
m |
m (EK moved page SetWindowTitle (CMS) to Global Command: setWindowTitle) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | Set a custom title in the game application title bar. Only applicable, if the game is running in window mode. | |
− | |||
− | |||
− | |||
− | |||
− | + | == Syntax == | |
− | + | <syntaxhighlight lang="lua"> | |
− | + | setWindowTitle(title) | |
− | Syntax | ||
− | <syntaxhighlight> | ||
− | setWindowTitle( | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | == Parameters == | |
− | |||
− | |||
− | |||
− | + | {| class="ts" | |
− | + | |- | |
− | + | ! style="width:15%" | Parameter | |
+ | ! style="width:15%" | Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | title | ||
+ | | string | ||
+ | | The new title for the game window. | ||
+ | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | == Return values == | |
− | |||
− | |||
− | + | none | |
− | |||
− | |||
− | |||
− | |||
− | |||
+ | == Examples == | ||
− | < | + | '''Example 1:''' Set the window title based on the user's operating system language. |
+ | <syntaxhighlight lang="lua"> | ||
+ | sysLang = getProperty("system_language") | ||
− | + | if sysLang == "German" then | |
− | + | setWindowTitle("Mein neuer Titel auf Deutsch") | |
− | + | else | |
− | + | setWindowTitle("My new title in English") | |
− | + | end | |
− | + | </syntaxhighlight> | |
− | + | {{toc}} | |
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 23:29, 15 May 2023
Set a custom title in the game application title bar. Only applicable, if the game is running in window mode.
Syntax
setWindowTitle(title)
Parameters
Parameter | Type | Description |
---|---|---|
title | string | The new title for the game window. |
Return values
none
Examples
Example 1: Set the window title based on the user's operating system language.
sysLang = getProperty("system_language")
if sysLang == "German" then
setWindowTitle("Mein neuer Titel auf Deutsch")
else
setWindowTitle("My new title in English")
end